Some American state police forces were corrupt, racially-biased, brutal to prisoners, etc. In the worst states, the only short-term fix was to import federal police (e.g. FBI) with no connections to local gangsters.
The only other option was federalising (state) National Guard or bringing in soldiers. When Governor George McGovern got too uppity, Feds threatened to send in regular army paratroopers, but eventually pulled a legal slight-of-hand by federalising state NG. Federalising NG removed them from the individual state's chain of command and forced them to take orders from the Pentagon.
NG are not trained to walk a beat, but could provide disaster relief or riot squads. One role of riot squads is telling local police when to back down.
As for the RCMP: not all provinces can afford police academies, forensic labs, SWAT Teams, airplane's, helicopters, tracking dogs and the long-term costs of personnel-management.
It is only the wealthier provinces (Quebec and Ontario) that can afford provincial police forces.
New Brunswick raised a provincial highway patrol during the 1980s, but it did not last very long.
The RCMP struggles to train young constables for all the different jurisdictions. Traditionally, young RCMP constables were posted to isolated detachments in the Arctic or thinly-settled farmlands on the prairies.
OTOH now a young RCMP constable is equally likely to be dropped into Newton (Surrey, B.C.) a distinctly urban environment with more drug addicts, sex-workers, petty criminals and poverty than anyone can count.