> My state has laws that say every new housing development must have affordable housing as a small percentage of the new housing that developers build.
If your state is California, as I suspect it is, its housing policy is a miserable failure worthy only of derision and scorn. The price of housing is a bona fide humanitarian disaster, and the mandate you refer to is well known; it has solved almost nothing, what pathetically few solutions it has delivered are distributed by lottery (a key indicator of its abject failure), and — as your own description makes clear — it is just one more hurdle to make things more uncertain, drive up prices, and to drive away developers and the new construction they pay for.