> how much people can borrow
This is the main factor, and it's a result of the monetary policy of the last decades.
Since this number has been increasing compared to wages, it's becoming less sensible to build apartments for rental. But at the same time, those are needed to increase density and availability of affordable housing in attractive cities.
It's a mess.