Wal-Mart has been the nation's biggest gun dealer because of the number of stores. But each one doesn't sell that many.
Selling guns is more of a problem than selling tires or televisions becaue of the many laws and regulations. As noted, WM gave up in CA because of the oppressive laws and that was about 15% of the available market. Other states are nearly as bad.
Not selling handguns limits the value of WM to many gun shoppers. Internet sales through home FFLs also has cut into their sales.
The bottom line is that the burden of the laws combined with the shrinking profitability means it may not make sense from a business standpoint to continue selling guns. This is not an anti-gun move by WM, it's just a business decision.
I can remember when everyone sold guns. The liquor store had an FFL and would sell ammo and have a few guns on display. Same with the local hardware store. That's where those guns with the funny names like Revelation were sold. These were actually Marlins and Glenfields mostly with store brand names stamped on them. Sears sold guns made by Winchester and others labeled "Ted Williams." Even the pharmacy had an FFL! Not anymore. Too many headaches, too many laws, too many lawsuits, too little profit.
Hell, even real gun stores ain't what they used to be. I used to visit gun stores and marvel at the large number of guns on display. The last half-dozen gun shops I visited had fewer guns than I did at home.
Sad.