The problem is that in money based capitalism, someone is going to be poor no matter how you work out the math. Throw in the econ 101 supply demand curve where if everyone can afford food and shelter there is room to raise prices, and you have a guaranteed homeless problem.
As long as we can look at the people who are currently homeless, point at them condecendingly and blame them for their plight, the system can remain stable to the benefit of everyone (except the poor, but they don't count).
However, if you kill the homeless, someone else will become homeless and need to be killed. Then someone else will become homeless, etc. Pretty quickly, a lot of people will not want to play capitalism anymore.