Even after this week’s plunge, Amazon’s shares remain expensive by most measures. Its price-to-earnings ratio was still over 500.

Amazon’s lofty valuation has long baffled many investors and analysts. But one thing they can agree on: Betting against Amazon has invariably turned out to be a mistake over the long term. (The stock has tripled over the past five years.)

A dozen Wall Street analysts lowered their ratings on Amazon on Friday, but until this week’s earnings report, they were overwhelmingly positive about the company, with 35 of 44 analysts rating the stock a strong buy or buy. Until this week, downgrading Amazon — no matter what its valuation — hasn’t been a path to popularity, as Eric J. Sheridan, an Internet analyst at UBS Securities, found out in February, when he reduced Amazon to neutral from buy. “Amazon is the third rail of investing,” he told me this week. “I had hundreds of angry people calling me for days. How dare I say anything negative about Amazon?”

By contrast, investors punished Google last week after it reported strong revenue gains and billions of dollars of operating profit. “Investors won’t cut Google any slack,” Mr. Sheridan said. “I like Google. The valuation is very reasonable. The quote unquote shock, in their earnings, was that margins were a little weaker than expected. Google is spending on new initiatives. It’s just a reminder that they’re ambitious and innovative.” That’s exactly what investors have always said they loved about Amazon.

“Google shouldn’t be viewed as a mature company,” Mr. Sheridan said, but it is. Amazon, founded in 1994, is actually four years older than Google.

Stock prices are a reflection of investors’ predictions of future profits, which is why there’s always an element of gazing into a crystal ball. The future earnings of mature companies with long track records can be forecast with considerable accuracy, but for newcomers, especially in untested technologies, it’s mostly sophisticated guesswork.

Amazon isn’t a newcomer, but it has long had a powerful story driving expectations: the notion that it will become the global Walmart of Internet retailing. Walmart has been one of the most successful companies of all time and something of a holy grail for investors. Anyone lucky enough to have invested $1,000 in shares at the time of its 1970 initial public offering and have held them is now worth many millions.