A bill that would allow police in France to spy on suspects by remotely activating cameras, microphone including GPS of their phones has been passed.
While this news article is, apparently, not trustworthy, in general, France could demand every phone sold in the country include some kind of spyware. Many sellers already add a lot of programs by default anyway, so this would be how I image it might be implemented.
Given that 7 people were recently arrested for using privacy respecting tools like the Signal messenger and Protonmail, removing that bloatware/spyware might then be cause enough to arrest you. After all, only terrorists want to have privacy, right?