The funding is a million strings attached / crazy opinions. So you have to be EXPERT to apply and manage the intersection of all the credits and funding.
You are still subject to all the zoning / environmental red tape (even if it helps that there is affordable). If you are building luxary units easier to absorb this all, otherwise, again a nightmare.
The places with affordable housing money tend to be wickedly expense. If San Francisco took their affordable housing money, and built out at the ends of BART they could build some multiple number of units. To get 100 affordable units into San Francisco is very very expensive.
Outside of these crazy subsidizes, most other regulatory rules / delays etc argue against building "cheap" housing.
So we house and feed folks in high need in some of the absolutely most expensive places in the US and world. And some of the units (which prioritize families) are relative massive 3 bedroom places. If you go to chinatown in SF, the density is so so much higher (private market) though likely illegal in many cases.
If you spent the $1B/year even in California in one or two of the cheaper areas to live in you'd get so many multiples for it that it would blow your mind. Or if you were allowed to build chinatown levels of density.