"Harmful" content has significant overlap with freedom of speech, so governments find it hard to ban directly. But when there's a big corporation facilitating access to that content, then it becomes a clear case of "evil capitalist profiting from harmful content - corporations need to take responsibility!".
When a government doesn't like end-to-end encrypted photos and cloud drives, all they have to do is issue a secret order telling Apple to disable it.
And when people find workarounds for intrusive and insecure age verification methods, what's better than a total sideloading ban to regain control?
Honestly, that was one of the things that shocked me about the Digital Markets Act in the EU. It gives them less power over their citizens, not more. (Of course, they also passed the Digital Services Act around the same time, and now they're looking at age verification and breaking E2EE, so I guess they figured they had to balance things out...)
I don't mind this being a bit chaotic. At least it shows that there are trade-offs.
What makes this difficult though is that they are under constant attack from highly organised and automated criminal operations that create and exploit accounts en masse.
Any solution to the tyrannical state of affairs we are subjected to (even more so as developers) needs to balance better protections for real people (including as you say for people who have committed some transgressions) with fighting organised crime.