gitHub_portrait_3_pd_logoGitHub founder and CEO Tom Preston-Werner might have waited a while to raise venture capital for his company, but when he eventually did, he went big. A year ago, GitHub announced that it had closed a $100 million funding round, almost all of it from Andreessen Horowitz, the VC fund’s largest investment to date.*

But why on earth would a four-year-old social coding company need to raise so much money?

The answer, as Preston-Werner told Sarah Lacy at PandoMonthly in San Francisco tonight, was actually pretty simple. The company wanted a buffer.

While GitHub has long had a steady revenue stream, its operating margins did get perilously thin. “Our ambitions were outstripping our resources,” Preston-Werner told Lacy. “We were in a phase where we were operating so cash-lean that we had essentially no money in the bank.” The company’s newly-hired chief operating officer looked at the books and was like, “What’s wrong with you people?”

Not only was Preston-Werner determined to squirrel away money in reserves in order to be “responsible,” but the company was also about to launch GitHub Enterprise, a big and expensive push into serving businesses. So when it did come time to discuss fundraising, GitHub decided it wanted to put itself in a position where it would never have to worry about having enough money to invest in a particular opportunity.

Just as importantly, Preston-Werner wanted to take advantage of the favorable market conditions. Venture funding was easy to come by at the time, he said, but you never know how long the good times are going to last. It was similar to the situation leading up to 2008, he said, when people criticized Amazon for raising so much money a year before the Great Financial Crisis set in, and VCs started advising startups to batten down the hatches. Raising a big round would help GitHub ride out a downturn and the fluctuations in the venture capital market.

“We thought if this is something we’re interested in,” Preston-Werner said, “then we should do it when the opportunity is right.”

One assumes the company’s reserves are looking pretty healthy these days.

[Andreessen Horowitz partners Marc Andreessen, Jeff Jordan, and Chris Dixon are individual investors in PandoDaily.]