To all the retailers that compete with Wal-Mart the news that it is giving up on its eight-year struggle to conquer the German market may induce a bit of a schadenfreude—sometimes even the behemoth of Bentonville doesn’t stroll into town and pick up all the marbles. Savor the moment, advise retail experts, but don’t think this means that Wal-Mart has lost its touch.

What happened in Germany—and in South Korea, where Wal-Mart sounded the retreat in May--is about uncharacteristic execution errors and cultural miscues, they say.

On July 28, Wal-Mart announced that it will abandon Germany and sell its 85 stores there to rival discounter Metro AG. In May, the company sold its 16 South Korean stores to a local operator. Meanwhile, its 322-store U.K. subsidiary Asda is falling short of profit expectations, Wal-Mart executives admitted.

Overall, the loss of Germany and Korea is a rounding error for the $312.4 billion company—Wal-Mart did not disclose terms of the sale to Metro, but says it will take a $1 billion charge related to the deal. Germany provided just .8 percent of revenue last year. “It proves they are vulnerable, but on the other hand, Germany is not China and the market potential in Germany is not that significant as it is in some other countries,” says Cynthia R. Cohen, president of Miami-based Strategic Mindshare, a retail consulting firm. “So it’s not a bad financial decision to re-allocate your international resources into markets that are much larger.” Still, the company has emphasized the need for international expansion as growth plateaus in the U.S. Same-store sales for July were only 2.4 percent higher than last year’s numbers.

The company’s stated goal is to make international business account for about 33 percent of its revenues or roughly $103 billion. But though the retailer has been able to succeed in close-to-home markets like Canada and Mexico, its Asian and European ventures are proving decidedly more difficult: Its international division currently brings in about $63 billion in sales.

With strong local competition, notably the Aldi and Lidl chains, Wal-Mart had a hard time winning over German consumers. And strict local business regulations concerning store operating hours and employee protections prevented the chain from getting U.S.-size margins. Retail analysts say that Wal-Mart failed to adapt sufficiently to the German market. Consumers there are notoriously value-conscious, which should have helped. But Wal-Mart did not tailor its merchandise mix and committed some cultural faux pas.

“There were a number of obstacles in Germany and some of them were self-inflicted,” says Ken Perkins, president of Retail Metrics, a Swampscott, Mass.-based firm. “They really didn’t do enough research. In parts of Europe, there is significant distaste for things Americana and for Wal-Mart in particular.”

Similar mistakes crimped Wal-Mart’s progress in South Korea. When the company opened its first stores there in 1998, it tried to build its business model around dry goods, such as electronics. But South Korean shoppers were looking to the discount giant to supply them with value-priced food and beverages. There were also reports that Koreans were disappointed with the quality of customer service. In the end, Wal-Mart couldn’t compete with the sophisticated local operators, who offered low prices and understood costumers’ tastes. Wal-Mart wound up selling its South Korean unit to the country’s biggest retailer, Shinsegae Co., for $882 million.

“They just weren’t able to gain any sort of critical mass,” says Perkins. “It doesn’t mean they will pull out of international markets altogether--they will just concentrate on areas where there is a decent return on investment capital.”

Wal-Mart can’t wait forever for international to pick up, however. The chain is facing fresh challenges at home, including rising gas prices, which curb consumer spending and limit the number of trips to the store. In an effort to be less dependent on lower-income customers, the discounter has been trying to attract a more middle-class clientele with the expansion of its electronics, home furnishings and apparel offerings.

“As they get bigger, it gets harder and harder for them to grow on top of their base,” says Cohen. “In the past they’ve dealt with it by adding more categories. They are almost out of categories to add, so they are going upmarket, trying to capture more customers. It’s very early [to say] if they will be successful. But they keep trying and they are diligent. And they have a wonderful base to start from.”

Indeed, Cohen points out, many of Wal-Mart’s previous ventures – including its first foray into Mexico and its attempts to sell branded apparel to teenage girls – did not take off right away. But the retailer stuck with it and was eventually able to reach its goals—as rival retailers know all too well.