At the state level, we have housing laws that mandate ratios of affordable housing. Many townships faught this in court (and lost) because schools and infrastructure are capital projects. Bonds are secured today against some future tax base.
Don't forget that developers and investors are voters too (and lobbyists) who are going to vote against the municipalities.
My point: it is a nuanced situation and not as simple as "Got mine FU" or "just build more". Build where? How do you pay for it fairly?