By Dan Primack
September 21, 2012

FORTUNE –There are lots of lessons to be drawn from the Facebook IPO: Don’t let your CFO scrounge for every last dime. Make sure your CEO pays wardrobe deference to Wall Street. Remove board members who are more loyal to their bank accounts than to the company. But those are all relatively minor compared with the big takeaway from this debacle: Don’t go public.

Do you remember Facebook (FB) before the IPO? It was the Fonz, somehow straddling the invisible line between accessible and unobtainable. Then came May 18, and Facebook suddenly morphed into Potsie — more style than substance, and just a bit creepy. In short, uncool.

Facebook lost favor the moment its shares began trading on Nasdaq, not when it dropped its financial drawers several months earlier. The social network had easily remained a media and venture capital darling after publicly disclosing that its growth had begun to slow (as is normal for an eight-year-old company) and that it faced significant challenges migrating its desktop success to mobile devices.

MORE: What Zuckerberg should have said

All that really changed on May 18 was that something that once belonged to a relatively small group was now common property. What must really burn up Mark Zuckerberg, of course, is that he knew such a transformation could occur. He was part of a generation of tech entrepreneurs who came of age after the dotcom meltdown and who generally viewed IPOs as an unnecessary evil. Unless your company was desperate for cash, why subject it to analysts’ whims, regulatory oversight, and the media scrutiny that accompany public listings?

No wonder Zuckerberg’s letter to prospective IPO buyers began with the lines: “Facebook was not originally created to be a company. It was built to accomplish a social mission.” Translation: I’m being dragged into the public markets kicking and screaming.

Like Google (GOOG) before it, Facebook had run up against the arbitrary number of outside shareholders it was allowed to have before being required to publicly disclose certain financial data. For all practical purposes, that meant it was time to list.

So Facebook filed for its IPO on Feb. 1. Two months later Congress increased the outside-shareholder limit fourfold, as part of JOBS Act legislation designed to increase initial public offerings (via reduced reporting requirements, etc.). That’s right: A pro-IPO bill could have resulted in Facebook’s indefinitely postponing one of the largest IPOs in American history.

MORE: Facebook’s China problem

This is where I have to think Zuckerberg would like a mulligan. Congress had given him an easy out, but he ignored it. Maybe he was worried about an employee revolt, given that so many paper millionaires were already scoping out Palo Alto real estate. Maybe he was softened by LinkedIn’s (LNKD) IPO success in June 2011, to the point that he overlooked subsequent post-listing troubles for both Groupon (GRPN) and Zynga (ZNGA). Or perhaps he just got carried along by the momentum of the thing.

No matter the ultimate reason Facebook went public, its subsequent experience serves as a stark reminder of how IPOs can flip a company’s entire script in a single day. Think of all that the company has lost in exchange for cash it didn’t really need. Why wouldn’t CEOs of other large tech startups take a serious look at long-term alternatives for shareholder and employee liquidity, perhaps via the burgeoning secondary market for private company stock?

Some Silicon Valley folks insist that Facebook is an outlier, an anomaly in terms of how fast it grew and how fast it’s falling. But they are wrong. Facebook is the embodiment of why going public often causes problems for large, successful startups.

Maybe Congress knew what it was doing by simultaneously seeking to promote IPOs while exempting Facebook from immediate listing. Unfortunately, Zuckerberg didn’t take the hint. The uncool kids rarely do.

This story is from the October 8, 2012 issue of Fortune.

You May Like