It's not the navy. You're not under orders. They can fire you if they want. But if that's not enough for you: promises and loyalty works boths ways. Suppose you're a veteran at twitter. The company (you thought) joined is not what it is today. You're not bound to any original promises.
Furthermore, you didn't make any promises. You signed a contract, which is only partly binding (check your jurisdiction for details; e.g., where I live, a non-compete clause is frequently overruled by a judge). You didn't promise to increase shareholder value on your mother's life.
Finally, when the interests are substantial enough, ethics trump loyalty and honor. I don't think I have to substantiate that.
Of course, this doesn't hold when you adhere to some kind of "corporatism", where the state and/or corporations decide what's good for you.
None of this justifies willfully harming your employer.
Edit: One of the things that is an exception I believe is whistle blowing. You may expose stuff you deem unacceptable or harmful to the general public. But I guess that's about it. Of course this all depends on your jurisdiction.
Is this what you said during your hypothetical interview with Twitter? If yes, be my guest. If not, you should abide by the promises you made to your employers.
It's got nothing to do with "self-imposed honor code" or whatever terms people come up with to belittle people with integrity. You made a promise when you accepted that offer. You either stand by that or quit.