Market economy works fairly well as to get the most value from the least work. If you allow empty apartment buildings, you will have empty apartment buildings if that's likely the best risk/reward for the owner.
It's not about too much or too little market economy, it's about accepting the proliferation about the wrong kinds of markets, markets that are not in the best interest of people. We don't accept trade in ivory because that's not good for the elephants, there's no reason to accept apartment buildings left empty when it's to the detriment of people.
No economic policy will govern itself, especially not any policy claimed to do so.
Mostly too little capitalism - buildings are very heavily regulated. Zoning, property tax, planning laws, rent control, and habitability laws are big factors. For example maybe it's illegal to rent out the building because the kitchens are too small, and renovating it would not only cost a lot up-front but also push up the property taxes, so you'd have to be confident of getting a return - and maybe you're intending to knock it down and build a replacement as soon as you get planning approval.
If capitalism does what it says on the tin, I don’t get why can't we have a market cleaning price for buildings. Are we doing too much capitalism, or not enough? Is this just all very efficient but I’m not smart enough to figure out how?