Most states have several levels of state school tuition, from community colleges to state universities to the flagship. In Colorado it can cost $14k+ for tuition in Boulder, but other state schools are much less, plus the state pays the same $85/cr for residents which goes a lot further at Metro State (tuition for a semester @ $ 3500) than in Boulder. Housing is almost always cheaper at a ‘not Boulder’ school.
But people want Boulder. They want UF rather than U of West Florida or FIU. They want Berkeley over Merced.