Your own minimum standard needs to be maintained, even when doing the work for others.
That's not always legal; when hired to do a job, you're really only legally allowed do what your superiors tell you. It's their money and their company, not yours. Using it to advance your own personal goals is unethical at best, and even criminal at worst.
If you find it morally objectionable to do a certain task, you can always resign. I've done it ( in the middle of the .com bust, too). I didn't regret it, though money was tight for a while.