Each instance on Mastodon and the rest of the Fediverse has its own set of rules, written by the people who run that particular instance.
On Mastodon, you can see your home instance's rules by clicking on "About this server" in the bottom left of the screen.
If you don't like those rules, you can move your account to a different instance or even start your own.
This is a key difference between the Fediverse and centralised social media such as Facebook or Twitter: on the Fediverse there is no single group or person with power over everyone.