Programmers enjoy a rare market where employers compete for hiring a good dev, not the other way around. Unless lots o employers do things so unethical you can't stand working on them, you can just walk away from an unethical boss and spend time digging through numerous invitations from other companies.
I live in a market where finding a job quickly makes it another shitty job, and only after amply signaling your submissiveness (ah, Europe). You get no unemployment money, because it's you who quit, of course.
There's also the fact that you're the good guy and yet you're the one getting shafted, while the arses above keep doing what they do. Anyone with a brain will sense something's wrong, and will rethink their ethics.