Actually, Nintendo does that because of a King Kong lawsuit. The full story is pretty interesting, but now they are so afraid of being like the loser of that lawsuit, Universal, that they can't risk losing their IP since they saw how devastating it was for others. There's a really interesting video where a lawyer talks about Nintendo's legal actions from his POV, I'd recommend watching it.
Also, SEGA kind of only hires those people because their official Sonic games are consistently hated. I mean Frontiers is amazing but they've made a lot of mid-bad games. Plus, SEGA used to be just like Nintendo when it came to fangames, until their IP value dropped as the Sonic games got worse and they released crappy games like Sonic 4, Sonic Boom Rise of Lyric, etc. Nintendo actually consistently makes great games, and they have to protect their IP, which has very high value.