Walmart's (NYSE:WMT) decision to get out of some of the premium web businesses it acquired just a couple of years ago may seem, on the surface, like defeat. But its decision to divest ModCloth and its interest in selling personal-shopping service JetBlack suggests a savvy evolution of the retailer's online presence.

It's tough idea to digest. While Walmart has taken a respectable shot at the dominance Amazon.com (NASDAQ:AMZN) enjoys, Amazon is still Amazon. EMarketer estimates the company controls nearly 38% of the United States' e-commerce market, despite a streak of double-digit sales growth for Walmart's online arm. eBay (NASDAQ: EBAY) has been online forever, too, and is surely much further down the learning curve than the world's biggest brick-and-mortar retailer is.

But Walmart is a fast learner. It has quietly demonstrated an understanding of what works for its online and offline effort, and what doesn't.

Walmart is zeroing in on a winning formula

The hints started to drop in the middle of this year, when Walmart's e-commerce chief Marc Lore explained the company would rather shift away from buying established brand names, and instead build them up from scratch. A mattress brand called Allswell was the proverbial guinea pig. Walmart invented it, and it's on pace to drive hundreds of millions of dollars' worth of revenue for the retailer this year. Lore said of Allswell: "This was like an 'aha' for us. ... We can create these ourselves."

Image source: Getty Images.

Then in September, Walmart's senior vice president of digital consumer brands, Andy Dunn, told a conference crowd, "I don't really like digitally native vertical brands." It's a rich irony, simply because Dunn is a co-founder of the digitally native men's clothing brand Bonobos, which Walmart acquired in 2017. Dunn is a big fan of omnichannel marketing, meaning online, offline, and even partner-driven revenue is critical to success.

Even more irony: Walmart-owned Bonobos' most profitable operation is its partnership with Nordstrom.

Individually, these seemingly benign insights. When coupled with one another, though, they are telling. In the wake of news that Walmart is selling digitally native women's apparel brand ModCloth yet is simultaneously buying -- well, reviving -- a defunct women's apparel brand called Scoop NYC, they become even more telling. Scoop will be Walmart's very own to manage however it sees fit.

In simplest terms, Walmart has figured out that simply "bolting on" an established brand like ModCloth is no guarantee of success.

Positioned to outperform Amazon

An unnamed corporate spokesperson told The Verge earlier this month:

When we acquired ModCloth, our primary focus was to build assortment through proprietary, digitally native brands. Our approach has evolved and our current focus is on building direct to consumer brands that we can leverage in an omni way. Similar to online grocery, we are putting our investments in areas where our omni capabilities and unique advantages put us in a position to win.

One of those unique advantages is the nearly 5000 stores the company operates in the United States, versus none for Amazon when it comes to apparel.

That hasn't prevented Amazon from becoming an apparel powerhouse. Of Amazon's 74 private-label brands, 66 are unique apparel brands. And, if it hasn't yet, Amazon is widely expected to soon surpass Walmart as the country's biggest clothing retailer. All of that business is done online.

If omnichannel is as important as Andy Dunn suggests it is, though, Walmart only has to start thinking about in-store signage and square footage to round out the cultivation of brands like Scoop NYC, or the online intimate apparel retailer Bare Necessities it acquired a year ago.

The home-grown brand development doesn't necessarily have to stop at clothing either. Amazon has proven batteries don't have to be labeled Duracell or Energizer to be marketable, and Walmart's already found success with private-label groceries. There's no real limit.

Patience is merited

It's not a reason to step into a new position in Walmart, especially given its 25% run-up this year. Indeed, the stock feels ripe for a little profit-taking right now, whereas others can be had at a little less frothy valuations.

It is an encouraging maturation of Walmart's online strategy, though, which some had feared was nearing a strong headwind. Whereas some rivals wouldn't think so strategically and would instead simply maintain their status quo (and accept whatever sort of online sales growth they had achieved), Walmart's e-commerce chiefs are thinking critically. Even philosophically. The retailer's e-commerce machine is apt to only get better, even if it's going to take a couple more years to see the fruits of these tough divestiture and acquisition decisions.

It's just too bad the company's e-commerce business makes up only about 5% of its revenue, though that proportion is growing at a respectable pace, too.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. James Brumley has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Amazon. The Motley Fool has the following options: short October 2019 $37 calls on eBay and long January 2021 $18 calls on eBay. The Motley Fool recommends eBay and Nordstrom. The Motley Fool has a disclosure policy.