Developers would happily build affordable homes, but the municipalities won't allow it. They want high end homes that will provide more property taxes. They want lower-and middle-class folks to live in high density inner city 'projects'.
Which is a problem, really.
The thing is that when the government stopped buying homes and just gave everyone a voucher, they set off a housing shortage because landlords could set their own prices.