That's how to get fired. If the boss says "do it" and you say "no" and you each hold your ground, eventually it gets to "do it or you're fired." (In a few companies it might be "do it or you're fired" vs "stop asking or I'll transfer" but it's rarely "stop asking or boss is fired.") A good boss won't let it to that, but that power over another—to hire, promote, and terminate—is what fundamentally defines the hierarchy.
Giving you the benefit of the doubt as to who was toxic at those jobs that ended badly, it still sounds like you're significantly more assertive than most workers. I do agree that people should stand up for themselves regardless of their position in the hierarchy. There's no excuse for mistreatment, and especially these days, consider how someone who's mistreating you may mistreat someone who's more vulnerable.
(edit: moved under the right parent post)