Specialization is a thing within policing as much as it is within the rest of life. It's not like the same person who knows how to investigate a murder scene is equally capable of investigating complicated financial crimes on Wall St.
----------
In terms of aligning incentives, there are various situations where there would otherwise there would be a mismatch of "who pays for this/who's responsibility this is" vs "who this is meant to serve".
On your examples:
Campus PD - College has equal/larger population than town. Town-college relations are often tense at best. Voters in town have no interest in spending their tax money on adequate policing for the college, college has no interest in donating a bunch of money to the PD to maybe get better services that they still have no say in. Students often heavily distrust the local PD and are unlikely to report crimes to them. It's still a problematic structure, but the premise that it would be better without is questionable.
Transit Cops - No individual town or city is going to patrol the system coherently otherwise, and areas which utilize the service less are unlikely to spend significant resources policing it. Services which cross state lines also have jurisdictional issues even with just using normal state-level police.