You're making the mistake of reading the instruction to the rich young ruler as prescriptive for everyone, but it's not.
The rich young ruler was idolizing his wealth and Jesus identified that.
The Bible also talks about some challenging ways to follow Christ, Peter James and John drop everything from their fishing career. Jesus says you need to hate your family. These are things we need to be willing to do, but not a model we have to follow in order to be right with God.
You're right about the usual state of vagrants and that they squander resources. The Bible says that he who doesn't work shouldn't eat.