WASHINGTON—When Jeff Bezos founded Amazon.com Inc. more than two decades ago, he sought to keep the online bookstore away from the government’s reach. He has said he looked into placing its headquarters on an Indian reservation as a tax-saving strategy.

That was then. Today, Amazon, whose revenues last year topped $177 billion, has become deeply entwined with the federal government. Mr. Bezos has built one of the largest lobbying operations in Washington, bigger than those of powerhouses such as Exxon Mobil Corp. and Walmart...