Bitcoin will either be wasteful in proportion to its market cap, or it will be vulnerable to attack. There are no other options.
Anyone with that computing power will use it to earn transaction fees, not to attack Bitcoin by sniping funds through double-spends. If Bitcoin were ever attacked such that transactions were not immutable once confirmed, people would stop using it and the value of Bitcoin would drop. A 51% attack only destroys Bitcoin. There is no financial incentive (at least not in terms of Bitcoin).
(This is in the original white paper.)
Still it this exact belief in math that will become a self fulfilling prophecy and keep bitcoin afloat way past someone executing 51% attack.
But generally, it's a fair generalization that if step #1 in taking down Bitcoin is acquiring >50% of mining power, most rational actors will go off-mission and decide that step #2 is mine Bitcoin, not screw with it.