Because economic pressures are much stronger than humanitarian pressures, so standardized things are optimized to be as small and cheap as possible. Hence slums, standardized testing and junk food.
What’s actually happening in the US is houses are getting larger because city governments are run by old people who nitpick all apartment buildings (because they think they’re ugly) and approve unlimited expensive single-family houses, which have only gotten larger over time.
There's a lot of incentives in the US, but to simplify it: per-house-price and education funding are linked, via property taxes. Taxes paid by one home vs cost to educate average number of children per one home.
If we funded more local public education directly from non-property-tax sources (or made public education more efficient), a lot of the resistance to lower-cost housing would disappear.