> why does Google think that spending money in this way is useful?
It's not useful, it's required. You have two choices. You can do the equivalent of what Microsoft did for a long time, and hide in the Pacific Northwest and pray that the Monster in DC just leaves you alone, while all of your competitors lobby to have you destroyed. You will not be left alone no matter what, if you achieve that kind of success, no matter how you achieve it. The only rational choice, is to get in the game and try to influence the outcome, which is what all of your competitors are going to be doing. Microsoft learned that very painful lesson after waiving at the US Government for years and thinking they could ignore what was going on with their competitors lobbying. Google learned from Microsoft's mistake, and got in almost immediately once their position became dominant.
With the politics in DC, you're either in it defending your position, or you're dinner being served up by your competitors who are very aggressively in it and trying to use the political machine against you as a weapon. The US has a $7 trillion government system top to bottom, one third the size of the economy. There's no avoiding that.