While I, personally, agree with you, I don't judge developers who take the opposite position. It's really risky to buck someone who has more power than you, and, honestly, that person who has the power stands to benefit from your obstinance in ways they won't understand or appreciate. So they're not going to feel increased loyalty to you for saving them from themselves. Why not do what the person paying you asks and put food on your table, risk-free, vs. risking your job for someone who may well fire you for trying to help them.
There's also the point that any time you take one path, by definition the other path doesn't exist and you can't compare what happens on the path you do take to the one they asked you to take. So literally everything that goes wrong can be blamed on the choice to deviate from their instructions, even if things would have been _even worse_ if you hadn't.
So I think professional ethics are great, but it's probably easier to build a nice retirement fund if your ethic is just doing what you're told. And that's a type of ethic that protects the people you love vs. the people who see you as a cog in their machine.