This is due to the target audience being children and teenagers, and the games are designed to be enjoyable for everyone.
However, there are a few instances of strong language in fan-made content, such as mods or fan animations, that are not officially associated with the Sonic franchise. But these are not part of the official games.