There's a sales technique where the first person to state a value causes other people to pick values around it. So Snapchat struck first and says that they are worth 40 billion. Minions listen to that and think that 35 billion would be a bargain.
It doesn't really matter what millions think Snapchat's valuation should be. The vast majority of shares bought at IPO will be from a relatively small number of institutional buyers capable of sophisticated financial analysis.