Shortly before a private spaceflight company’s test rocket exploded over southern Texas last weekend, state lawmakers announced millions in subsidies to get the company to continue launching rockets in the Lone Star State.

Space Exploration Technologies, commonly known as SpaceX, will receive more than $15 million in public financing to build a launch pad in Cameron County, near the Mexican border.

The subsidies came after SpaceX’s founder, billionaire tech mogul and pop technologist Elon Musk, made campaign contributions to key state lawmakers and hired lobbyists with ties to Austin.

SpaceX is one of a number of innovative and disruptive startups that, though lauded by some free marketeers for making government-run markets more competitive, are finding themselves drawn to political advocacy, whether out of shrewdness or necessity.

Of the more than $15 million in incentives for a SpaceX launch facility in Brownsville, Texas, announced this month, $13 million will come from the state’s Spaceport Trust Fund.

Initially created in 2002, the fund began to wind down together with the idea of commercial spaceflight. But with the ascendancy of SpaceX and similar companies, Texas looked to secure its place as a destination for commercial spaceflight operations.

Musk took notice. A prolific political donor, he began pouring money into the campaigns of key state lawmakers. On November 7, 2012, he donated $1,000 to state representative Rene Oliveira (D). Two weeks later, he gave state senator Eddie Lucio Jr. (D) $2,000.

The next month, the Associated Press reported that Lucio and Oliveira were working to secure state backing for a potential SpaceX launch pad in Brownsville.

Oliveira said he was "sensitive to the fact that these are taxpayer dollars that we should still be reasonable with how much we offer." But he worried that other states were offering more generous packages of incentives.

He and Lucio looked to replenish the coffers of the spaceport fund in order to lure Musk’s company to the state. "I think that we'll be able to convince our colleagues that this will be a good thing for all of Texas," Lucio told the AP.

Lucio and Oliveira eventually secured a $15 million budget rider authorizing funds specifically designated for use by SpaceX.

The incentives were contingent on the company actually selecting the Brownsville location. "The rider tells SpaceX that the money is waiting for you but you can’t touch any of it until you commit to set up your program here," Lucio explained.

He later complained that few of his colleagues on the state senate’s Finance Committee helped him shepherd the rider into an annual budget bill. But one colleague who did aid the effort was the committee’s chairman, state senator Tommy Williams (R), Lucio said.

Just months earlier, Musk had donated $2,000 to Williams’ campaign.

He also donated $1,000 to state representative Jim Pitts in December 2012. Pitts chairs Texas’ House Appropriations Committee. He and his then-chief of staff, Aaron Gregg, visited a SpaceX facility in January 2013, as Oliveira pushed financing that would eventually make it into his budget rider.

On January 25, SpaceX lobbyist Demetrius McDaniel reported spending $1,000 on food and drink for Pitts and Gregg at five Los Angeles restaurants, and another $500 on "entertainment" at the Staples Center.

The Lakers beat the Utah Jazz in a home game on that date.

Lauren Dreyer, an in-house SpaceX lobbyist, paid another $464 in entertainment expenses for Pitts and Gregg’s Staples Center visit. She footed $98 in food expenses on January 25 at two of the same restaurants listed in McDaniel’s expense report, and another $200 for Pitts and Gregg at the SpaceX Restaurant in Hawthorne, CA.

The following night, Dryer took the two to Hollywood’s swanky Greystone Manor nightclub. Over the next two days she bought another two meals for each of them, then gave them each a package of SpaceX swag, including "t-shirt, track jacket, iPhone case, mission patch, rocket pen, baseball hat, and keychain flashlight/pointer."

The lobbyists’ work paid off. Pitts "was very helpful in obtaining the commitment to spend $15 million," Oliveira would later tell Bloomberg.

McDaniel and Dreyer were two of six in-house and external lobbyists employed by SpaceX in 2012 and 2013. The company paid between $200,000 and $445,000 for their services, according to the Texas Ethics Commission.

SpaceX’s long running government relations efforts in Austin secured them more than just financial incentives. Oliveira also authored legislation to close a public beach in Brownsville for hours at a time in order to permit SpaceX launches there. Lucio wrote its Senate companion bill.

The eventual law was considered a crucial step in attracting SpaceX to south Texas.

"The bill provides SpaceX a reliable yet flexible system for planning launches, and removes an impediment that could have threatened the entire project," Oliveira said at the time.

In addition to the $13 million SpaceX will get from the spaceport trust fund, it will not have to pay Cameron County taxes for 10 years, saving the company an estimated $2 million.

Even with its lobbying expenses and Musk’s campaign contributions, SpaceX will enjoy more than a 3,000 percent return on its investment in Texas’ political process if it decides to build its new launch facilities in Brownsville (not yet a sure thing).

The increasing involvement of SpaceX and other disruptive companies in government affairs has raised red flags among some conservatives, if not about the companies themselves than the realities of a political system that requires heavy expenditures to secure a seat at the table.

Former Obama campaign manager David Plouffe’s new gig as the senior vice president for policy and strategy with ridesharing startup Uber was seen by some as indicative of a political drain on otherwise innovative and productive businesses.

"Uber having to hire David Plouffe is all that’s wrong with America," declared James Pethokoukis, a financial and regulatory expert with the American Enterprise Institute.

"Valuable technological innovations have a good track record of survival, with maybe the notable exception of nuclear power," Pethokoukis wrote last week.

"Then again, who knows what companies and innovation we never see because they were unable to surmount regulatory burdens or other government favors on behalf of entrenched interests."

As SpaceX competes for market share in the federal launch vehicle industry, which until recently was dominated by a handful of prominent defense contractors, it faces similar political impediments to its growth in a tightly regulated industry.

Some of those incumbent players have said that SpaceX lacks the experience necessary to displace them. While its recent test rocket explosion may fuel that criticism, the company has also worked to remove political impediments to its growth.

It is not Musk’s first foray into the political process. Two of his companies, Tesla Motors and Solar City, have received extensive backing from the Department of Energy. As in Texas, Musk has made high-dollar donations to major national politicians, including President Barack Obama.

While a SpaceX launch facility would bring an estimated 600 jobs to the economically distressed Brownsville area, some doubt that the large incentives the company has been able to secure are worth their price tag.

"A lot of money is given to people that doesn’t benefit but a few people," a veteran Texas lobbyist told Bloomberg. "It’s good for whoever got the money and for the lobbyists who got it."