That's factually incorrect. You have it backwards: Google was giving The Federalist money to advertise digital billboards on The Federalist.
Do they have the legal right to do so? Perhaps, at least until they're declared a utility and regulated, but this probably requires a lawyer to answer, because in some cases political opinions are protected in California.
Now a question for you: do people have the right to be outraged about it, and frightened by the threat Google poses to free communication and thus democracy?
To your other point, yes I most certainly do.
It was not Google that came up with this idea. It was one media outlet that is opposing another media outlet. Google is just a tool in this case.
You are clearly not balanced in your opinion in this matter and you are looking for excuses how to make it look right.
Google is choosing to not take the Federalists money and doesn’t want to put up Federalists billboards on its property.
Does Google have the right not to accept The Federalists money?
Frame it like that and I think the problem becomes clear.
Edit: I have this backwards, I think my point still stands but I was wrong on the transactional aspect