Shoppers at a Wal-Mart store in North Miami, Florida. (Photo by Joe Raedle/Getty Images/Thinkstock.)

As long as cigarettes are legal, retail stores have every right to sell them. But at what point does a company claiming to be a champion of affordable health care lose credibility by continuing the practice?

That's the question Wal-Mart (WMT 1.32%), the world's largest retailer, needs to decide. And the pressure to do so increased with the recent announcement by CVS Caremark (CVS -1.07%) that it will stop selling tobacco products by the beginning of October.

"Ending the sale of cigarettes and tobacco products at CVS/pharmacy is the right thing for us to do for our customers and our company to help people on their path to better health," said CVS's chief executive officer Larry Merlo. "Put simply, the sale of tobacco products is inconsistent with our purpose."

Should Wal-Mart follow CVS's lead?
To be fair, Wal-Mart and CVS are markedly different companies. Whereas CVS holds itself out as the "largest integrated pharmacy health care provider in the United States," Wal-Mart is instead a discount retailer that sells a wide range of merchandise, health and wellness products being one of many.

At the same time, however, the Arkansas-based company has pushed heavily into the health-care space as it anticipates heightened demand from the aging baby boomer generation. Indeed, every annual report over the past eight years has trumpeted its role in improving the health of its customers and associates.

The company went so far in 2006 as to claim that an "essential part of Wal-Mart's mission is to provide sustainable, healthy, value-oriented products to meet customers' needs." It doubled down in 2011 by saying it has an "enormous responsibility to lead on issues that make a difference for associates and communities ... [including] economic opportunity, sustainability, responsible sourcing, healthy living, and community involvement."

To the company's credit, it's considered halting the sale of tobacco products for more than a decade and even ceased the practice completely in its Canadian stores in 1994 when confronted with pressure from the government. But the one thing that has always stood in its way has been the company's commitment to shareholders.

Before becoming CEO, Doug McMillon, then head of the chain's Sam's Club unit, told The Wall Street Journal that halting cigarette sales is something he has "thought about." He nevertheless went on to note: "I don't expect it to happen in the next year. It's a big business, so it makes it harder to stop."

It's clear that Wal-Mart is stuck between a rock and a hard place. On one hand, I believe it's honestly committed to playing a positive role in society. Why would it not, considering who its customers are? But on the other, its board members and executives owe shareholders a fiduciary duty to be responsible stewards of the bottom line.

How will this play out? That remains to be seen, but I think it's less about if it will happen and more about when. And when that time comes, it's not Wal-Mart shareholders who will have reason to quiver. It'll be the tobacco companies.