Just the headline of this article is enough to set many investors' hair on fire. Why in the world would anyone ever choose an old-school brick and mortar stock over a dynamic e-commerce giant that has defined the last two decades of consumer behavior?

Because Walmart Inc. WMT, +0.90% is growing fast, that's why. And when you look at the details, much of that growth is coming from territory Amazon.com AMZN, +5.69% is looking to claim as its own.

Sure, it's hard to argue with the performance of Amazon lately. Shares are up a tremendous 350% in the past five years compared with 50% for the S&P 500 SPX, +1.05% and a measly 33% for Walmart stock. But when you look beyond the long-term megatrend of Amazon, the last six months or so haven't been so rosy; the tech giant is actually off about 15% from its September 2018 highs.

At the same time, Walmart is gathering momentum — particularly after big earnings on Feb. 19 that topped Wall Street expectations.

I'm not saying you should bet against Amazon, or even that Walmart shares will win out in the long term. But in 2019, things are looking much better for the old-school big-box brand of Walmart vs. its hipper, digital cousin Amazon. Here are seven big reasons why:

1. Same store sales: The most recent Walmart earnings report caused shares to jump thanks to better-than-expected profits and sales. But the devil is really in the details here, as Walmart put up an impressive 4.2% expansion of same-store sales. It's a common critique that Walmart stores are dirty and unattractive, but when CEO Doug McMillon took over in 2014 he pledged to scale back on openings and invest heavily in the physical experience via better-paid workers, faster checkout times, and better stores. That included $10.1 billion in capex last year alone. It hasn't been an easy road, but strong same-store results recently prove the tactics are paying off.

2. Online sales: Of course, while same-store sales are an impressive defense against Amazon, the most powerful number by far is the 43% e-commerce growth that Walmart posted last quarter — a simply amazing number for a retailer of this size that booked over $11.5 billion in online sales last year. Furthermore, Walmart continues to invest in a broad array of digital offerings including its Jetblack personal shopping service, text-to-purchase functionality and even self-driving cars to deliver products in Arizona.

3. Fresh foods sales: Jeff Bezos & Co. may be able to shrug off claims that Walmart will eat its lunch on electronics, but Amazon certainly should be concerned about groceries, given its 2017 acquisition of Whole Foods for $13.7 billion. Walmart remains the leader in this space, with estimates that more than $1 of every $5 spent on groceries goes to Walmart, while its peers share the rest. If Amazon wants to win with Amazon Fresh, it has to beat Walmart — and the latest numbers show that will be a very tall order.

4. Manufactured e-commerce events: Plenty of companies have found a path to big profits simply by learning from the lessons of their competitors and seizing the opportunity. Walmart’s entry into a manufactured e-commerce event was a big sale on Saturday, Feb. 23 that it uncreatively dubbed “Baby Savings Day.” Whether it's Cyber Monday sales or Amazon’s own manufactured Prime Day sales event, or even Chinese e-commerce platform Alibaba Group BABA, +0.53% with its Singles Day, these kind of promotions work — so investors should spend less time calling Walmart unoriginal and more time looking at the profit potential it will deliver.

5. The original thin-margin king: Have investors forgotten that Walmart was the first megastore to drive down margins and run out the clock on the competition? Have they forgotten Walmart is a company that topped $500 billion in revenue last year, almost twice that of Amazon? Amazon has indeed proved that only companies with massive scale can play a game of razor-thin margins. But Walmart invented that game, and is one of the few companies that can play it with Amazon at a high level.

6. Returning capital to shareholders: Beyond the growth potential, it's worth noting that Walmart has a tremendous history of thinking about its shareholders and returning capital via dividends and buybacks. For instance, late last year it committed $20 billion to share repurchases. Furthermore, Walmart stock has increased its payouts at least once a year since its first dividend declaration in 1974. When you consider that Walmart has found the money to invest in stores and e-commerce even as it has focused on returning capital to shareholders, investors get a better understanding of how well-run this retailer is.

7. Safer stock in this choppy market: The markets have been volatile in 2019, and while things are looking up at the moment you don't have to rewind the clock far to see how fast Amazon shares can lurch lower; in less than 90 days from the end of September to the beginning of December, its shares plunged 30% from $2,000 a piece to a low under $1,400. This is not to say Walmart is immune to sell-offs, but if you're nervous about the broader state of markets in 2019, then having a strong dividend stock trading for a forward P/E of about 19 is much safer than holding a volatile tech stock with a forward P/E north of 40.