I’m pretty sure loads of other classes have alignment restrictions - notably clerics and paladins
I remember my D&D 3.x DM insisting we follow RAW, so if I wanted to take levels in assassin (who else remembers prestige classes?) then I had to be evil. 3 players went along, and the druid betrayed us to the “good” guys. Had a massive brawl where we (team evil) won, thanks in part to a hail mary “I run around the corner and hide. That’s… a natural 20 for 37” the betraying druid player couldn’t beat.
I remember my D&D 3.x DM insisting we follow RAW, so if I wanted to take levels in assassin (who else remembers prestige classes?) then I had to be evil. 3 players went along, and the druid betrayed us to the “good” guys. Had a massive brawl where we (team evil) won, thanks in part to a hail mary “I run around the corner and hide. That’s… a natural 20 for 37” the betraying druid player couldn’t beat.