P/E ratio is only meaningful for companies with little or no revenue growth. For companies with very strong revenue growth, like Amazon, revenue growth is financed with earnings, which creates a misleadingly high P/E ratio. Investors know this. For these companies, it is more useful to look at metrics like market cap/revenue to determine if they are overpriced, which at 3-4x for Amazon is in a very healthy range. Simple metrics like P/E ratio tell you little about the health of a company when taken out of context; a low P/E ratio is often a sign of a failing company.
As more of the largest companies in the market exhibit strong revenue growth, it drives the P/E ratio of the broader market higher without implying anything about the underlying equities.