You could do that sure. But if someone sues you, and you are required to give up your emails as per discovery laws, and one of those emails says "I fired him for being a Democrat/republican", then you would lose the court case and have to pay lots of money.
Google explicitly fired the guy for the memo. They aren't hiding as for why they fired it they explicitly gave the reason.
If you explicitly give a reason for why someone is fired, and that reason is illegal, them you will lose the court case.
Similarly, you could also find someone hiking in the woods, and just shoot them or something, and you might get away with it. Or you might not.
That's how the law works.
Google has been very clear as for why the guy was fired. Now the only question is is their stated reason equivalent to firing someone for politics. And if so, that's illegal.