While Amazon.com's (AMZN -2.56%) e-commerce dominance may seem like a fait accompli at this point, it's easy to forget the company's inauspicious start. Under the leadership of CEO and founder Jeff Bezos, Amazon has transformed itself from a small bookstore that used to hold meetings inside then-larger competitor Barnes and Noble to one of the largest companies in the world. Unsurprisingly, in his path to becoming the richest man in the world, Bezos hasn't lost many battles.

If there's been one competitor who has thrived in an Amazon-led world, it would be Marc Lore. Lore founded online retailer Jet.com in 2014, and in a little over two years, the site was acquired by Wal-Mart (WMT 0.46%) with Lore becoming the company's CEO of Wal-Mart e-commerce in the U.S. Under Lore, Wal-Mart has improved its digital operations and appears to be the most serious competition to Amazon's U.S. e-commerce business. Jet.com had plenty of capital to help it get off the ground, some of which was provided by Jeff Bezos himself.

Amazon's first office building.

This small building was Amazon's first office. The company held meetings at a local Barnes and Noble.

Messy diaper wars

Jet.com was not Lore's first foray into e-commerce. In 2005, Lore and partner Vinit Bharara founded Diapers.com. The high-risk idea was simple: focus on a demographic (young parents); provide an essential product as a loss leader (diapers); sell other items like formula, car seats, and toys; and use efficiencies to lower costs and to provide inexpensive shipping. The idea paid off, and the company later grew to add Soap.com, an everyday-essentials site, under the parent company Quidsi.

By the second half of 2009, Lore noted the company turned a pre-tax profit. Still, the environment became tougher for the young start-up. According to the tell-all book The Everything Store: Jeff Bezos and the Age of Amazon, Amazon dropped the price of diapers up to 30% to aggressively steal market share and drive the smaller competitor out of business. It worked ... sort of.

Under threat of an escalating price war, Quidsi gave up and sold itself to Amazon for $500 million and $45 million in debt assumption, leaving Lore with millions after repaying earlier investors. While both Bezos and Lore celebrated the acquisition with pleasantries, Lore later admitted:

It wasn't a celebration. It was sort of like mourning. That's what it felt like. And it was really weird. We were like, "Why do we feel so bad right now?" Like, we just sold this company and made a lot of money, and we just didn't feel great.

Lore worked for Amazon for a few years before moving on. Amazon shuttered Quidsi in 2017, laying off 263 workers.

Wal-Mart was not going to lose the second time

The cash from Amazon and successful exit was key in helping Lore start his next venture. After receiving $55 million from Bain Capital, Accel Partners, and MentorTech Ventures, the latter two also investors in Quidsi, Lore started Jet.com. Initially, Jet.com differentiated itself by operating under a true membership-based model like Costco or Wal-Mart's Sam's Club. For $50 per year, you could purchase bulk goods (including diapers) for 10% to 15% below the lowest online prices. Within three months, Jet.com dropped the membership fee and became a traditional e-commerce company.

Wal-Mart, looking to build out its digital channel, was a serious competitor to buy Quidsi for $600 million, according to reports, but lost out to Amazon. The company did not miss its opportunity the second time, paying $3.3 billion in a combination of cash and stock for Jet.com. The king of retail tasked Lore with heading up digital operations. Since the acquisition, Wal-Mart's digital business has kicked into high gear with third-quarter sales rising 50% year over year. Additionally, Wal-Mart has pushed into Japan more forcefully with a strategic alliance with homegrown Amazon competitor Rakuten.

Look for both Bezos and Lore to continue their success

While Lore has done an admirable job competing against Bezos, don't expect Amazon to buckle under the pressure. First, e-commerce can accommodate more than two companies, as the channel will continue to benefit from a shift away from brick-and-mortar retail. Second, most of Amazon's profit comes from its high-margin Amazon Web Services cloud offering, a business Wal-Mart is unlikely to enter.

Before Bezos settled on the name Amazon, he had another preference for his young company's nom de guerre: Relentless. Personally, I think this name is particularly apt for both Jeff Bezos and Marc Lore. Retail investors should watch this rivalry closely in the years to come.