There are many reasons Goldman Sachs did the deal. If Facebook goes public and chooses GS as the financial institution to do the paperwork, that's one reason.
In addition, if they believe speculation will drive Facebook stocks up after the IPO, then it's a good investment. Overall at 70billion valuation, Facebook has a P/E of 170 ~ ish. So earning 1 million dollar will drive the valuation of Facebook to 170 million. Let's try to use some common sense in this. Either Facebook start to monetize like crazy, like earn 10 billion profit next year, 10x of what it was this year, or the valuation has a problem?