Earnings: powered by Amazon Web Services. Source: Amazon.com.

Investors in Amazon.com (NASDAQ:AMZN) have to be happy with its recently reported third-quarter results. On both the top and bottom lines, the company outperformed analyst expectations. As far as top line goes, the company beat consensus estimates of $24.91 billion by reporting a revenue haul of $25.36 billion.

However, in Amazon's oft-discussed earnings figure, the company gave bulls a reason to be exuberant, but reporting an EPS gain of $0.17 versus a consensus estimate of a $0.13 loss. And while many have contrasted Amazon's surprise profit with brick-and-mortar retailer Wal-Mart's (NYSE:WMT) struggles, there's a little more to the story than a simply a retail comparison.

To be fair, Amazon is operating where Wal-Mart is barely maintaining status quo. As far as top line goes, Amazon grew retail-related revenue 20% this quarter on a year-on-year basis, whereas Wal-Mart's last reported quarter had virtually no year-on-year revenue growth, with the company now facing concerns as to its three-year capital investment plans that may be too late to change its fortunes.

For Amazon, however, as good as its retail results were, there's a clear standout performer for earnings: Amazon Web Services.

It's all about the segment operating margins
While Amazon Web Services growth may come as a surprise to some, it's not a shock to investors if you've been paying attention. Earlier this month, before earnings, the company noted that it was on pace to be a $7.3 billion business. In an earlier article, I said this would be a huge tailwind to the stock from a financial basis, and it seems that is exactly what is happening. See the attached table for sectional operating results:

MetricNorth AmericaInternationalAWSConsolidatedAWS As % of Consolidated
Net sales  $15,006  $8,267  $2,085  $25,358 8.22%
Segment operating expenses  $14,478  $8,323  $1,564  $24,365 6.42%
Segment operating income  $528  $(56)  $521  $993 52.47%
Segment operating margin 3.52% (0.68%) 24.99% 3.92%  

Source: Amazon 10Q. Revenue figures in millions.

From that data, you can see how important Amazon Web Services is to the company's bottom line. Unlike low-margin retailing where Amazon has to compete with Wal-Mart's every day low pricing strategy, and where the company is operating at a loss in the international markets as it continues to invest, Amazon Web Services is a comparatively high-margin business.

As opposed to the consolidated segment operating margin of 3.92%, AWS posted a segment operating margin of nearly 25%. The segment income, now bigger than Amazon's total retailing segment operating income, tumbles down the income statement to enrich investors. And even though the company's free cash flow may not be as great as advertised, as the company heavily relies on capital leases, Amazon Web Services is a higher-margin business than retailing.

Bad news for Wal-Mart
For Wal-Mart, however, this is a tough situation to be in. A downside of Amazon Web Services' growth is the company is now able to enrich investors through that segment, perhaps offsetting lower profit margins in its retailing operations. And while that doesn't appear to be happening, as North America retailing swung to a gain this quarter from a loss in last-year corresponding quarter and International's loss narrowed, AWS could offset narrower margins in retailing operations.

Wal-Mart is in a tough spot. After years of rewarding investors, mainly the dynastic Walton family, instead of investing in the underlying business (especially growing out its online operations), the company now has to contend with a retailer growing its retailing top line 20% and has a high-margin supporting business.

Recently, Amazon founder Jeff Bezos shot up to No. 3 in the Forbes list of richest Americans, pushing past the politically involved Koch Brothers -- the Walton clan, on the other hand, are among the worst-performing billionaires on the list.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.