As always, market cap is not a valuation of the worth of a company, it's measure of investor confidence. The company itself does not get this money as they usually only get the initial sale price for their stock.
In fact, having high market cap can actually be problematic for companies as it can lead to bad decisions making and strategies in countries like the US where publicly traded companies have a legal obligation to maintain or increase stock valuation for shareholders or hand out dividends. It also makes it nearly impossible to regain control if they have to buy back their own shares.