If guess it means we should resist the temptation of money and do the "right" thing, whenever we could. It's a tough call (to reject money and so-called better prospect), but it's equally painful to work in something which you don't believe in. Though it might not make economical sense, but it makes perfect human sense.
I agree with you & OP that if you don't want to work for a company whose morals you disagree with, you should feel empowered to leave (I've done it myself). However, if these companies are surrounded by "yes men", nothing will ever change. There is value (righteousness, even), if you ever find yourself in such a situation, to stay with the company & challenge the "evil" status quo.
There are two ways to lead by example in this situation. One is to walk away. The other is to breed change. Don't discredit the latter.
On one hand, breeding change is a brave and good stance.
On the other hand, most often than not, you'll be tilting at windmills.
You have to recognize when you have a real chance, and not fight a losing cause. I guess the standard advice works in this case as well: fail fast :)
I've ignored my own advice and am stuck on a company with a toxic IT department, I tried for years to change it, but upper management is not interested and the IT managers were clueless and only interested in keeping their jobs.
The third option is to start a disruptive new competitor doing what they do only better and more ethically, supporting long-term relationships and sustainable development.
As long as anyone but you holds the gold, it's much harder to engender change. Putting them out of business, on the other hand, has the awesome side effect of getting one rich while doing the right thing.