A Wal-Mart e-commerce fulfillment center. Source: Wal-Mart.

Silicon Valley is the home of many of today's biggest companies and hottest tech start-ups. You'll also find an outfit called @WalmartLabs there, a research division for Wal-Mart Stores' (WMT 1.51%) e-commerce efforts. Despite launching @WalmartLabs less than five years ago, Wal-Mart's e-commerce sales have slowed to a crawl over the past year. Fourth-quarter year-over-year online sales growth came in at just 8%.

Meanwhile, Amazon.com (AMZN -0.21%) continues to grow its (exclusively online) sales just fine. Last quarter, the company saw a 24% year-over-year increase in North American sales and a 22% increase internationally on a constant-currency basis. In fact, Amazon accounted for about half of all online sales growth in the U.S. last year.

While Wal-Mart has just as many strategic advantages as Amazon, if not more, when it comes to online sales delivery, it still can't seem to beat the online retailer.

Winding down investments
Wal-Mart originally planned to spend about $1 billion on its e-commerce operations in fiscal 2015. It ended up spending just $700 million. The $1.2 billion to $1.5 billion it was supposed to spend in 2016, ended up being revised down to just $900 million. This year, the company will still spend $1.1 billion on e-commerce, but far below its original plans a few years ago.

The downward revision in Wal-Mart's e-commerce investments indicates that it's fallen in its list of priorities. That's contrary to what CEO Doug McMillan told analysts on the company's fourth quarter earnings call: "As we begin this new year, I'm focused on ... getting all the ingredients in place for stronger growth in e-commerce." Of course, actions speak louder than words.

Management is stuck between a rock and a hard place when it comes to e-commerce. Investing more in e-commerce is the only way it will be able to compete with Amazon, which is continually expanding its offerings and distribution network. At the same time, too much investment in such a small part of its business will continue to drive down profits.

Last quarter, Wal-Mart saw a 7.1% decline in operating income because of increased expenses. Wal-Mart points to higher wages for its employees as one of the main factors, but investments in e-commerce were right behind it. Even though that $1.1 billion budget for e-commerce capex is less than originally planned, it still represents 10% of the company's projected capex for fiscal 2017. Comparatively, e-commerce sales account for less than 3% of total sales at Wal-Mart.

Can't beat Prime
The key to Amazon's success is Amazon Prime, which offers two-day shipping, video streaming, and a slew of other benefits for $99 per year and functions as a covert loyalty program. Prime customers consistently spend more on Amazon than non-Prime customers do. That point has held true even as Prime's customer base continues to expand.

Worldwide Prime membership grew 51% in 2015. In the more mature U.S. market, Prime membership still grew 47%. That performance followed growth of 53% the year before on a base of "tens of millions" of members. That figure puts Prime members around 50 million customers worldwide, using a conservative estimate.

As more customers join Prime, they're more likely to choose Amazon.com over other e-commerce options because of the free two-day shipping and other benefits Prime offers. While Wal-Mart offers free drive-through pickup in its parking lots, it's hard to beat the convenience of Prime. The proof is in the numbers.