After a series of blockbuster earnings that blew past even the most optimistic of Wall Street expectations, Apple Inc. felt the pain of falling short of elevated expectations.

Apple said Tuesday its profit surged 38%, aided again by strong demand for the company’s latest iPhones and robust growth in China where sales more than doubled. The gains lifted Apple’s cash reserves to a record $203 billion.

But...