In the US, most state universities will probably have police, but it is a state matter so it varies from state to state. Private institutions probably don't have police, but still need security for students and otherwise. Private institutions could, in theory, contract with local police for coverage (some places) but can't form their own police forces.
At state universities it is the state that is responsible for safety and security and it is probably cheaper/easier to integrate training, etc. if they are police. They also can speak and act with the authority of the state if they are sworn officers. And use deadly force, of course.
In New York, for example, the police on state campuses are separately organized from the town police where the campus is, but they have all police powers both on and off campus. They carry guns, tasers, etc. and wear bulletproof vests when on patrol. I think they have special training so that they respond more appropriately to young people than municipal police might.
But many of the campuses are in small towns, even villages, in which the overall danger/threat is minimal.
It is probably more of an administrative matter, combined with the paranoia of politicians who don't want to be blamed if something really bad happens and they can't claim to have taken all possible precautions.