Emphasis mine. "Idle hands are the devil's playground" isn't just a saying, it is often at least metaphorically true. It seems to me that the only explanations there can be for the way we see humans on Trek are:
1. Humans have been genetically or otherwise medically modified to be more cooperative and docile. If genetically, whomever did it also altered all of the records so that doctors like McCoy, Crusher, and Bashir think that the current genome is the natural one. So... Section 31? Vulcan?
2. MOST of humanity was wiped out during WWIII and the Eugenics Wars, and they've actually kept to the population limit on the
Georgia Guidestones ever since. (Which should imply that Miles and Keiko needed licenses/permission to have their children, since they were both residents of Earth - but we weren't shown any of that.)
3. Troublemakers who stay in the Federation and push things beyond a certain point are sent for "reconditioning" in New Zealand. What we saw Paris going through when Janeway went to get him was actually the most gentle level of adjustment performed there, merited because of his family connections and a desire not to mess up his Starfleet training.
4. Most troublemakers leave to start their own independent colony. And most independent human colonies end up like Turkana IV with roaming rape gangs and other horrors, or like Tarsus IV under totalitarian regimes or dictatorships. The Federation actually generally finds these useful, since they act as examples of what humanity could do if pushed too far while allowing them to also disavow them as "not us".