Resources on the planet are limited, and limited resources can come to an end. But there are also a lot of resources that are renewable. A lot of land, for example, can be reclaimed from the encroaching deserts.
One ought not to encourage beggars, and yes, you are right, it is far better to donate to charities that address the causes of poverty rather than to him, a creature who is merely its symptom.