In Long Island where I teach, colleges and universities are engaged in a dorm-building boom—partially to attract out-of-town students, but partially because zoning rules often prevent student-oriented off-campus housing such as apartments and group houses.
The Supreme Court has upheld such zoning ordinances; in a 1974 decision upholding one Long Island suburb's right to exclude group houses, Justice Douglas wrote:
A quiet place where yards are wide, people few, and motor vehicles restricted are legitimate guidelines in a land-use project addressed to family needs...It is ample to lay out zones where family values, youth values, and the blessings of quiet seclusion and clean air make the area a sanctuary for people.
Justice Douglas's decision to use "youth values" as a reason to exclude college students seems a bit bizarre to me. Nevertheless, such restrictive zoning is understandable; I suspect that the middle-aged suburban homeowners believe that college-age students are far too likely to get drunk, drive recklessly, or have noisy parties (or worse still, do all three at the same time). Moreover, high car insurance premiums for college-age drivers suggest that this prejudice is rooted in empirical reality.
On the other hand, anti-student zoning creates its own problems. If students don't have any place to live near a college, they have to commute to the college. And in the automobile-dependent suburbs of Long Island, this usually means lots of driving. So ironically, a zoning strategy designed to create places where (in Justice Douglas's words) "motor vehicles [are] restricted" in fact may create traffic jams and pollution near universities.
As noted above, on-campus housing may well solve this problem, by allowing students to get to school without driving. This strategy may work well in the long run, especially if students do not bring cars to the dormitories with them. However, a municipality cannot always rely on a university's willingness to build dormitories, since dorm construction requires time and money.