It depends on where you are. I think your impression that most universities are in small towns is an apt description of midwestern universities (i.e. states like Wisconsin, Illinois, Indiana, Iowa, etc). It doesn't hold for either the west or east coast, really. See U of Washington, U of Oregon, Oregon State, state schools of California, state schools of New York, etc, etc. Sure, they might be in
smaller cities, but larger cities than most states even have.
I grew up in rural Montana and wanted to study Electrical & Computer Engineering. I didn't really have a choice to stay in state (and get my degrees from a quality program). I could have studied at University of Montana, but that would have left me with a degree that, for what I wanted to do, would have been worthless. Sure, I could have made the 30-45 minute commute and gotten a cheap degree, but the result would have been a degree I didn't want.
For an in-state state-school engineering degree, I'd have had to at a minimum gone to Montana State University (5+ hours from my parents' house). MSU doesn't have much of a EE/CPE department, but does have some good engineering programs (like chemical). I had to go to Chicago to find the program I wanted.