I won't get into too many legal specifics, as that's just opening up a can of words, but basically there are two ways a company can "go public". An initial public offering that is registered with the SEC is one way. That is what the vast majorities of companies do.
Also, if a "private" company is large enough and has a certain number of shareholders it is essentially deemed to become a "public" company such that it's required to register with the SEC and file public reports like other public companies. These rules are the only reason that Google went public for example. In 2011, the SEC began inquiries with Facebook about whether or not they would need to register because of these rules. It was inevitable that they would need to register, but going ahead and doing so in the form of a public offering has the benefit of raising capital (and providing liquidity to your existing shareholders), so that is what they did. They didn't really have much of a choice.
But that's not why they're getting bad press now. They're getting bad press now because the bankers priced the offering so high (and so large). They were able to do that only because there was enough demand to do that. Everyone and their dog wanted to be able to say that they bought into the Facebook IPO. But they didn't necessarily want to hold onto the stock long-term. So you had huge demand at the launch (or, rather, pricing) of the IPO, then later demand died down and the price dropped.