If they were given options which the employees had to pay $25 to exercise, then yes, the employees lost money. However, they had the same opportunity to make the analysis that any other investor had. No one forced them to exercise their options, and those who did paid too much.
Before IPO, nobody knows for sure what the real valuation of Facebook is. They have their own personal valuation, but the eventual price on the market is going to be a reflection of the combined valuations, it's an average of sorts of everbody's belief about Facebook's ability to make money over the time scale that each particular investor cares about. You can make a price-demand curve out of it; pre-IPO I wouldn't have bought Facebook at any price, some people thought $15 per share, some people $20, some people $38, and some would have bought no matter what.
Facebook was unique in being able to take advantage of this market uncertainty, namely each investor's uncertainty about what everybody else thinks. They shielded the overoptimistic from the pessimists' views, or the overoptimistic didn't bother to acknowledge that there would be pessimists, and Facebook took the optimists' money first. In doing so they got the most capital for giving away the least possible. (This shwredness probably bodes well for their ability to make money in the future.)
Usually tech stocks go the other way because the company doing the IPO has very little leverage to set their own price; investment banks are the gatekeepers and won't let anyone through unless their customers unless they and their most-favored-customers make a bundle on the initial sale. Facebook was able to flip that dynamic around and make sure that they themselves made a bundle while all the investment banks' customers lost out. It takes both leverage with the investment banks and knowledge of the demand curve in order to pull something like that off.
If the overoptimistic end up being right on the long enough timescale, they'll get their money back. But for the moment there are too many pessimists about the future potential of Facebook for a $38 buyer to be able to get what they deem a fair value.
Buy low, sell high, simply means being optimistic when others are overly pessimistic, and being pessimistic when others are overly optimistic. There's a bit of predicting what the objective financials of a company are, but it's far more about realizing the psychology of everybody else with money to trade. It's not just Silicon Valley engineers that are overoptimistic...
I say, if you can IPO at an overpriced level, do it, but don't believe your own hype and buy into it yourself. You will be disappointed.