When you lie down with dogs, you get fleas. For the past decade Wal-Mart (NYSE:WMT) has been greasing the skids for its entrance into the Washington, D.C., market by lavishing local charities and politicians with cash and lobbyists. According to The Washington Post, the discount retailer donated as much as $3.8 million to local food banks while a lobbyist has been kept on a $10,000-a-month retainer to caress and massage the pols. Forbes notes that Wal-Mart held photo ops with First Lady Michelle Obama and sponsored African-American cultural tours to play to local community leaders.

Wal-Mart had big plans for the D.C. area, doubling the number of stores to six it planned to open, thereby increasing the number of jobs it would provide the city from 1,200 to 1,800. And the District needs it. It has an unemployment rate a full percentage point higher than the national average, more than one-fifth the population is below the poverty level, and almost 11% of its residents have income below 50% of the poverty level.

But what has Wal-Mart gotten in return for its largesse and having the audacity of wanting to provide jobs, food, and clothing to the district's residents? Politicians just passed legislation to require Wal-Mart to pay a so-called "living wage" of $12.50 an hour, 50% more than the city's current minimum wage. Although the legislation is couched in terms of applying to any employer with more than $1 billion in revenues and stores of at least 75,000 square feet, there aren't so many such businesses rushing in to set up shop in D.C., so it's obvious it's targeted at the retailer.

Wal-Mart shouldn't have been surprised. The U.S. Chamber of Commerce ranks D.C. as the worst place in the country in terms of business friendliness.

For it's part, the retailer says that if the proposal becomes law it will abandon its plans for development in the District -- it's already reportedly scrapped plans for the three stores that aren't yet under construction -- because the costs associated with it no longer make the projects viable. It's not alone.

Over the years, retailers from Wal-Mart to Target to Home Depot have had to face down the threat of a living wage, or a rate higher than the federally mandated minimum, such as when Chicago passed a similar bill two years ago. At the time, Target threatened to leave the city and only Mayor Daley's veto of the measure prevented that from happening.

Although many are critical of Wal-Mart's supposed low wages, the average full-time rate is $12.78 an hour. That may be below the likes of the $17-an-hour wage media darling Costco (NASDAQ:COST) employees make, but the two companies are very different. Wal-Mart, at 4,400 stores (including Sam's Clubs), has 10 times as many stores as Costco, while carrying 140,000 SKUs compared to just 4,000 at its rival big-box store. Wal-Mart also employs some 1.4 million people while Costco has just 160,000. Moreover, the customers it serves are lower-income people than the average $85,000-a-year income of the upper-middle-class Costco shopper.

For the products and services Wal-Mart provides, it does a great job and provides its workers a decent wage for doing so. Efforts like those in D.C. to forcibly increase the salaries only ends up ensuring that no one has a job. Let's just hope that like in Chicago, every dog has his day and D.C. Mayor Vincent Gray follows Daley's playbook and vetoes this boneheaded bill.

Fool contributor Rich Duprey has no position in any stocks mentioned. The Motley Fool recommends Costco Wholesale and Home Depot. The Motley Fool owns shares of Costco Wholesale. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.