Matt Perman answers the question, Why Did Jesus Tell the Rich Young Ruler to Sell All that He Had? – What’s Best Next.
Short answer: It wasn’t to get him to demonstrate his total saving self-commitment to Christ; it was to expose his hypocrisy as a self-styled law-keeper.