Which they only did because they ran out of stuff to invest in (while still attracting so much other capital to invest at all), and the valuations of everything else was already stretched. not suggesting these firms were trying to do anyone favors by allowing people to afford homes the rest of the time, its more so that the math temporarily made sense with that much liquidity in the market so they jumped into real estate
(And yeah people would rather pay the government than invest in your startup so lets not pretend investing in main street was a real option)