Bear in mind that it’s provincial statute that defines policing services. Although the RCMP is a federal organization, they are also legally the “provincial police” in several provinces. A municipality that doesn’t have its own service defaults to RCMP under provincial contracts.
A contract with the RCMP comes with significant federal subsidy- 10% for larger communities, and I think as high as 30% for small ones. It also gives potential access to supporting resources from the rest of the RCMP, depending on need. There’s also economies of scale for training, infrastructure, procurement, IM/IT… Just how much that saves is very much open to debate of course.
It’s easy at first glance for a municipality to look at mounties (or OPP, or Sureté du Quebec) and to think “well, we want police with our city’s name on the shoulder”. Absolutely fair. It gets harder as soon as that means an immediate budget hit for loss of subsidy; for the municipality to have to procure guns, cars, and radios; and for the municipality to have to build its own records management infrastructure. It can absolutely be done; if Brockville or Corman Park can have their own police, they Surrey or Richmond or Moncton could too. It’s just a big pill to swallow, fiscally.
I think the RCMP, internally, is opening up a bigger gulf between federal and contract policing (probably to protect the former from the latter in terms of human resources), but that’s a far cry from the organization deciding they no longer want to police towns. That would probably be a decision at federal cabinet level, with a ten or twenty year timeframe.
Minor but real issue- an RCMP departure from contract policing in the provinces would still likely leave a residual need to provide uniformed policing for the territories, unless the feds threw each territory a bunch of money and support for its own service… But good luck staffing that.