Lobbying tends to have a negative connotation.

Mention the word and people think of shady men in suits, clandestinely trying to influence members of Congress. Some lobbying is, of course, exactly that (perhaps with briefcases full of cash thrown in), but the activity is not in and of itself a bad thing. While one lobbyist might head to Capitol Hill trying to make clubbing seals mandatory, another can work to lower the price of cancer drugs for orphans.

With that in mind, we should consider why Google(NASDAQ:GOOG) (NASDAQ:GOOGL)was No. 2 among all companies when it came to dollars spent on lobbying in 2014.

Google wants to be the good guys

A few years after Google launched, the founders posted their list of "Ten things we know to be true." This list of guiding principles includes the famous "do no evil" philosophy, as well as an overview of the company's core beliefs. From less-serious ideas including "You can be serious without a suit," to more important propositions such as "Focus on the user and all else will follow," the document attempts to cast Google as the good guys.

Most companies on the lobbying list above are spending millions to influence the government to do things that benefit them directly. Comcast, for example, spent $17 million trying to convince lawmakers that its $45 billion merger with Time Warner Cable merits approval.

The benefits for Google, however, are not quite as clear.

What exactly is Google getting?

Compared to most companies, Google has a very long-term view. The deep-pocketed search giant will invest heavily in projects that might not be profitable now, or ever. Some of these experiments require changes to existing laws.

Driverless cars, for example, are many years away from being a viable business, but even testing them has required Google to seek changes to current driving laws. Google might eventually make money from these efforts, but it is not the direct line to immediate profits that the Comcast-Time Warner merger would be.

In fact, according to the Center for Responsive Politics, much of the $17.5 million the company spent lobbying in 2014 went to support net neutrality.

It could be argued that an open Internet does not benefit Google. For example, in a less open system, the search giant would have the money to pay for preferential access that would make it possible to edge out the competition.

But after years and years of silence on the issue, Google took a strong stand in favor of an open Internet. For example, the company posted a document on its "Take Action" page that said, in part:

Our values remain the same: The Internet should be competitive and open. That's how it works today and how it has always worked. It's a level playing field, where new entrants and established players can reach users on an equal footing. If Internet access providers can block some services and cut special deals that prioritize some companies' content over others, that would threaten the innovation that makes the Internet awesome.

It is fair to say that on a non-level playing field, incumbents like Google would be able to snuff out many new entrants. Google has elected not to push for laws that would give it an advantage. Instead, it is putting at least some of its lobbying dollars behind its core principles, proving its values remain a major guiding force.

Do no evil, make a lot of money

While some of these are altruistic, it would be naive to believe a company makes No. 7 on the lobbying spending list without some of the cash supporting its bottom line. That's not a bad thing, as Google is also paving the way for other companies to succeed.

A start-up would not have the sway or dollars needed in Washington to change laws to support the development of driverless cars. A start-up might, however, be able to innovate and become a market leader in an industry the search company made possible.

Google is spending big on lobbying but doing so in a way that might influence laws that benefit other companies and the general public.

That's good for Google, and it's good for the rest of us, too.