Sometimes a big town grew alongside.
Sometimes it didn't.
Given that universities are non-profits, and therefore are not required to pay any municipal property tax, there were many that simply could not be patrolled by the neighboring towns. So they had to hire their own police forces.
Also, regardless of the formal chain of command for a university police department, the licensing of police officers (i.e. certifying someone as eligible to wear a badge) is a state matter. A university cop doesn't draw his salary from any government, but he can still get his badge taken away by the state if he misuses it.
I imagine that the custom arose because Anglo-American universities tended to be rural or at least in small towns, unlike the continental ones. Remember that universities until about 1900 were exclusively male, so that one was gathering a large number of young men at prime hell-raising age. A college of 500 students might generate more work for police than a town of 2000 citizens might otherwise have, or care to pay taxes to police.
They have a deputized police force of people available 24/7 for things as mundane as walking people home safely and as complicated as enforcing local/state/federal laws. They are sworn officers that have an agreement with the city they operate in that allows their jurisdiction to bleed into the city proper.
I never interacted with them when I was a student, but it's not out of this world to have a small police force for the campus - there were more people there on the average weekday than the city that I grew up in, which also had it's own police force.
At wealthier universities, this is also a way to convince parents that their kids are safe. Harvard, Yale, Penn, and Stanford (off the top of my head) are all in or near not-so-safe neighborhoods -- although gentrification of those areas are making this less of an issue these days.
This is bullshit.
http://www.chicagotribune.com/news/nationworld/ct-university...