I have always found confusing the existence of the gendarmes. They are indeed a vestigial force of the XIXth century, and should be transformed into a regular police force.
1- the territorial split between gendarmerie/police within the French territory
2- the fact the gendarmes for police work report to the Ministry of Defense.
If one had to design the police system from crash, they would likely merge police and gendarmes for police work.
The split is nonsense today.