If you have moral objections but still believe that the company can address them, why would you quit rather than try to change things from within?
At the same time, if your moral objections are strong enough, you should quit immediately. E.g. if your company says good news, everyone! We're opening concentration camps tomorrow!, I suppose the only reasonable action is to quit in disgust (as I said before, it's not like Google engineers are otherwise unemployable). If you stick around you're implicitly saying that your moral objections aren't that strong (at least not as strong as your desire to get a fat juicy paycheck), and sure, try to change from within, but keep it private and keep it civil, without biting the hand that is feeding you.