Lots of people like the idea of "affordable housing." That sounds nice! But I admit the common system of essentially bribing developers (either with carrot or by withholding the stick) to set aside housing units for people with certain incomes at below market rates is a bit weird.
Housing is expensive for two reasons. One, demand is high so implicit land prices are high. Two, construction costs are high. The latter is going to be more true if they are building "luxury" units, if they are building only large units, if various amenities like parking are bundled with the units, etc.
Anyway, the point I'm getting at is that one way to force developers to build more affordable housing is to force them to build more "worse" housing. Smaller units, no hot tubs, fewer bundled amenities, etc. Or, in some cases, simply *let* them build worse housing.