Public spending on things that require (a) maintainance (as almost all things do) (b) are massively less functional if the investment is not sustained (as many things are) is inherently going to lead to suboptimal results. It's equally bad if private entities do this, but for one reason or another, people seem to bitch about this less, because, well "freedom" etc.
Public spending (private too!) is also bad if it creates unnecessary bureaucracies and unnecessary obstacles. This can be tricky because defining "unnecessary" requires a set of values and these may not be universally accepted.
So, if you have a government program that behaves as in your hypothetical example, then the problem is inefficiency, corruption and waste, not government.
Since about 30% of my lifetime pay goes to taxes, and I am estimated over my entire life to make about $7m in salary. $1M of that is taxed, so potentially 300k of money is going to SCAMS.
Think about it, what if the government just decided tomorrow to give back all this money. I could finally afford to buy a house! But instead of me being able to buy a house, let's put another million bucks in a suitcase to fly to Mogadishu.
The problem is when people identify government as the problem, rather than those 3 attributes.
Now if you invest $6000 and no one else was doing it, they would probably have created some percentage of 1 bed out of it. And if 18 other people invest $100 each maybe that's enough to complete the bed for a year. And if those altogether 19 people hear that the money went to good use, they donate again and they tell their friends. Maybe the halfway house in 10 years starts earning $25k per year and they keep costs low and the beds start increasing, they rent more space.
The government forced funding breaks it and turns it into a fake jobs program, the community funding it actually makes the service accountable.