This is a question of degree: I have only once left a job without having lined up an alternative for ethical reasons. I have changed jobs a few more times for similar reasons but my response to unethical actions of my employer has been to look for other work. I have also looked for alternative work for promotion or better pay as I am sure we all have.
I have not yet felt the need to go public on my reasons for leaving a particular company but I can imagine circumstances where I would. I have certainly been vocal about the actions of my and other governments.
I was recently contracting with a company developing motors and motor drive circuits for use in lifts, or elevators as they are known in the US. I was designing the drive circuits. We had a problem with one installation in a UK Air Force base and I was asked to investigate. I could have refused because ‘I don’t work on military projects’ but the technology is not is not specifically military: the company had similar installations in apartment blocks, shopping centres and banks. I did the job but while on site felt uncomfortable surrounded by people with loaded guns and able to see military aircraft both on my drive into the facility and through various windows while I was working. Some of the aircraft, at least appeared to be, loaded with missiles ready for launch should the need arise.