Dormitories don't usually have kitchens, and there are usually minimum things that must be present in rental housing.
There absolutely are zoning restrictions that would prevent you from building a dormitory anywhere. Let me go buy a $10 million plot in La Jolla farms and try and put a dormitory on it. "Oh, but it's so close to UCSD", you might think... but the surrounding properties are all $20m+ single family homes (that's how it's zoned, after all) and the dorms would ruin the "community vibe".
In the middle of a large, populous city --on land that is not part of a postsecondary institution-- you can't just build a dormitory on it.
You can rarely build anything over 2 stories on the coast in California. There's no political will for it, so nothing happens.