If there’s one retailer that has a chance to be a legitimate online competitor to Amazon in the United States, it’s Walmart, the dominant retail giant of a past generation and the US leader in online grocery sales today.

But Walmart’s past success — and the practices it made commonplace as a result of that success — also hamstring the brick-and-mortar giant today.

The latest example: Walmart revealed on Tuesday that it spent $11.8 billion in the last year on dividends — payments it makes to every shareholder every three months — as well as buying back shares of stock from its shareholders. Over that same period of time, you might be able to guess how much Amazon spent on the same practices: exactly $0, despite Amazon generating $13 billion more than Walmart in cash from core business operations.

The discrepancy highlights how Walmart’s longtime relationship with its Wall Street investors is both a blessing and a curse, while Amazon’s own ties to investors is one of its key advantages. For Walmart, the company has built up credibility and trust among investors over a long period of time, but those same investors expect things like dividends and share buybacks, potentially siphoning off cash that could be used to better compete with Amazon or to invent new business lines that could attract new customers.

Amazon, on the other hand, has meticulously trained Wall Street to value revenue growth and moving into new business lines over large profits, which for decades allowed Jeff Bezos the unique advantage of operating according to a playbook much different from almost every other competitor. If investors expected similar things from Amazon as they do Walmart, it’s possible that inventions like Alexa or Amazon Web Services never would have seen the light of day.

Walmart has been paying dividends since it announced a 5-cents-per-share annual payment in 1974, both to reward existing shareholders and attract future ones looking for stable and cash-paying stocks. Today, Walmart pays out more than $2 per share annually to its investors, which would work out to more than $6 billion alone in dividends based on its current number of outstanding shares.

Amazon, on the other hand, has never paid a dividend. The company’s promise to investors has instead been built around the idea that as Amazon grows, eats up business in new markets, and starts generating meaningful profit, investors will get more excited about buying the stock, pushing the price up. It’s a virtuous cycle that has seen Amazon’s stock price increase around 5.5 times from this same point five years ago.

This is not to say that Walmart fails to recognize the constraints and challenges created by its past success. At its annual investor day on Tuesday, in fact, Walmart CEO Doug McMillon cited the influence on him of Clay Christensen’s seminal business book The Innovator’s Dilemma, which highlights the challenges incumbent businesses face in adapting and innovating when faced with threats from upstart competitors. And Walmart has spent more than $20 billion over the past few years alone on acquisitions of such competitors, with deals for Jet.com in the US and Amazon’s biggest rival in India, Flipkart.

Related Walmart is done trying to buy small retailers to compete with Amazon

But internal tension last year between the company’s traditional store business and its emerging e-commerce business, as revealed by Recode, showcased the challenge of altering a company’s DNA. The store team was “frustrated by some of the company’s money-losing forays into building in-house startups that seem unlikely to ever reach mass scale or grow large enough to move the needle for Walmart’s overall business,” I wrote at the time. Walmart announced last week that one of those startups, called JetBlack, would be shut down. (Walmart US e-commerce head Marc Lore told investors on Tuesday that the company would “leverage insights” from JetBlack in a test of a new service for Walmart.com shoppers in three cities.)

For Walmart’s McMillon and his leadership team, it’s a tightrope act: give your longtime investors enough of what they expect to keep them around, while investing and innovating enough to survive and thrive amid the rise of Amazon. But spending $12 billion just to keep investors happy seems like a large price to pay.