An investor can get value from a company in other ways than net profit. For instance share buybacks, dividends, mergers and acquisitions, companies can pay back capital. P/E ratio is just one very simple number which is not applicable to all situations. For example REITs have often very high P/E because most of their profit is distributed as dividends. Using P/E to try to value Amazon is in my opinion misguided.