Would this homeless person have a home if the bed store didn’t exist? Or what is the actual alternative that you’re looking for?
If you give away the beds, the bed store does not exist, and people who can afford beds wouldn’t be buying beds. Then the people who might have worked in the bed store don’t have jobs and they perhaps are also sleeping on the street.