The collapse of the Rana Plaza factory in Bangladesh in April that killed more than 1,100 workers in one of the worst industrial disasters in history exposed the unsafe working conditions that garment workers — many of them women — endure across the developing world. The tragedy also revealed the inconsistencies of some companies with respect to corporate social responsibility (CSR).

Take the case of Walmart. One month after the disaster, the world’s biggest retailer refused to sign on to the safety measures adopted by more than a dozen European firms. Those companies — including H&M, Carrefour and Marks & Spencer — backed a plan in which they agreed to have rigorous, independent inspections of the factories they contract with in Bangladesh and to help pay for improvements in building safety.

Gap, too, has been particularly vocal in its opposition to the initiative. The world’s third-largest apparel company says it supports much of the plan, but has suggested a change to it that would significantly restrict any legal liability for a company that violated it. (Gap did not use workshops in Rana Plaza. Walmart has said that no authorized Walmart production occurred there, but one of the factory’s workshops, Ether Tex, listed the retailer as a customer on its website.)

Instead, both Walmart and Gap, along with other retailers and the main retail federations, are forging their own plan to promote safety in Bangladesh’s apparel industry. This effort, announced last week, will seek to “develop and implement a new program to improve fire and safety regulations in the garment factories of Bangladesh,” according to the Bipartisan Policy Center, the nonprofit group that is spearheading the plan.

Despite their high-profile — and widely criticized — resistance to the originally proposed safety measures, Walmart and Gap would no doubt be quick to cite their initiatives in other areas: Gap is often considered an industry leader in CSR, and both companies have proclaimed themselves as champions of efforts promoting women. Two years ago, Walmart launched its Global Women’s Economic Empowerment Initiative, which doubled the money the firm spends on women-owned businesses and provides women around the world with job training and access to education, according to the Initiative’s website. Gap, in 2007, instituted P.A.C.E. (Personal Advancement & Career Enhancement), a program to help female garment workers in developing countries advance beyond entry-level positions.

To some, the companies’ rejection of the European plan — while also touting these kinds of social programs — appears contradictory, even hypocritical. A cynical view might be that when firms trumpet their efforts to produce organic foods, sell fair-trade T-shirts or just make the world a better place, they are diverting attention away from the more unseemly elements of their business strategies — such as polluting the air, manufacturing goods in unsafe factories or exploiting workers with low wages.

“You can look at the ways in which companies selectively engage with certain CSR issues as being hypocritical, sure, but at the end of the day, as a company, you can’t put money into everything,” says Americus Reed, professor of marketing at Wharton. “Rational decisions are being made. It’s not a conspiracy or manipulation.”

Judging a company’s CSR record as an investor, customer or prospective employee requires both skepticism and understanding, he notes. Resources are scarce, and companies make CSR decisions as part of a complex business process. “For people who see companies doing one thing with their right hand and doing another thing with the left, the question is: What is your more moral calculus? Does the good outweigh the bad? It’s not realistic to expect perfection. What we should be looking for is a company that has good values and takes a long-term perspective over the pursuit of short-term profit.”

Social Impact vs. PR Spin

Why do companies invest in CSR? The reasons are varied: to manage their risk, to recruit employees, to bolster their brand in the eyes of investors and consumers, to ease their supply chains, to save money, to increase their access to capital, to differentiate themselves from competitors and — sometimes — because it’s just the right thing to do.

Wesley Hutchinson, Wharton marketing professor and faculty director of the Wharton Behavioral Laboratory, recently conducted a survey with top corporate leaders to get their views on CSR. The survey asked executives to explain why they embark on CSR initiatives from the perspective of corporate strategy. (Respondents were allowed to cite more than one reason.) The vast majority — about 80% — said they do so to improve their “general corporate reputation.” The second most popular reasons for investing in CSR were that it “directly affects brand image for [their] products and services” and that CSR is a “matter of good corporate citizenship.” Executives also said that investments in CSR “help attract and retain desired employees” and “directly affect sales and profits for our products and services.”

“Do companies have PR people who are trying to spin things? Yes. But most CSR today is beyond pure PR ploys,” says Hutchinson. “Social impact is an area of unforeseen risk; in many ways, CSR is risk management. It’s not making you money today, but it makes you money in the long run.”

These days, the website of virtually every Fortune 1000 company has some form of CSR report. Most use the detailed principles of the Global Reporting Initiative, a nonprofit that develops and disseminates sustainable reporting guidelines. A typical company is guided in CSR decisions by what is considered “most material” for its stakeholders, including customers, suppliers, investors, employees and the communities in which it operates. A company examines its risks and opportunities with regard to social responsibility — such as health and safety in a factory, or environmental outputs — and measures which ones are most important to stakeholders. Then the firm decides which actions it will take to mitigate those risks.

The goal for most companies is to generate credible metrics that they can manage against, says Hutchinson. “Companies are trying to build a long-term track record of social impact that isolates them from high-visibility, possibly idiosyncratic events [like the collapse of Rana Plaza],” he says. “Consumers rarely read [CSR reports], but they do pay attention to what they see in the media,” he adds. “What they see in the media is heavily influenced by stakeholders: governmental organizations, watchdog groups, nongovernmental organizations and shareholder groups.”

Tipping Points

After a tragedy like the collapse of Rana Plaza, firms have difficult decisions. Do they join a core coalition to improve working conditions in Bangladesh? Or do they move their manufacturing to Indonesia, where conditions may be better?

“Firms are struggling with this,” says Rob van Tulder, professor of international business at the Rotterdam School of Management at Erasmus University. “This is where we see how well they manage CSR and how they manage these tipping points. In the U.S., the regulatory system is not conducive to change, and the stock market system rewards companies that place a priority on short-term profit. There is a context to these decisions, and firms are having difficulties.”

According to Tulder, to avoid seeming hypocritical, a firm might tell the public: “‘We are trying, but we face dilemmas. We’re in transition, and we are working to get to a better place.’ Don’t suggest you’re there already.”

Even when managers have good intentions, there are inherent challenges to executing a CSR strategy. For instance, if a company operates in a country that doesn’t support workers’ rights, like China, it’s harder to effect changes within that context. “There may be some smaller companies that are 100% socially conscious, but if you’re a big multinational operating in different countries where there are different standards, norms and cultures, it’s hard to catch everything,” says Keith Weigelt, professor of management at Wharton. “Companies are doing a better job of understanding their supply chains, but there is haziness when it comes to contractors and subcontractors.”

In addition, leaders delegate CSR initiatives to business units that have responsibilities to make money and cut costs. “This is where CSR falls apart,” says Bhaskar Chakravorti, dean of international business and finance at Tufts University’s Fletcher School. “Each of those units has certain targets they need to meet every quarter. They need to deliver on numbers and must use every negotiating tactic they can to meet them.”

Companies choose which CSR issues to devote time and money toward based on their own economic interests. Again, take the case of Walmart. According to the company’s website, Walmart is developing and testing advanced truck fleet technology in an effort to double its efficiency by 2015. “We’re already 69% more efficient, compared to 2005. Since 2007, the Walmart fleet has delivered 361 million more cases while driving 287 million fewer miles,” says the firm’s website.

“It makes so much sense for that company to reduce its fuel mileage and bring up its energy efficiency by getting its truck traffic down,” says Todd Cort, director of sustainability services at TUV Rheinland North America, the safety and certification services company. “It’s a clear-cut economic case,” and so the company is going to devote a lot of time, energy and resources to that initiative. “But there may be some other issues, such as health and safety in a factory, that run contrary to its economic motive, which is to drive prices down as low as possible. You can see where [Walmart] might put less effort into those issues. Issues that have less of a clear-cut business opportunity sometimes get a shorter shrift.”

In Walmart’s defense, it has a lot to do. “For the big brands like the Gaps and the Walmarts of the world, they have 90 to 100 or more separate topics of sustainability that they’re dealing with,” he adds. “They have a lot of stuff going on. Sometimes, even for a very responsible company, it’s possible that things slip through the cracks.”

Do Customers Care?

Recent research suggests a growing customer demand for information about how and where goods are made. A study last year by Harvard University and Massachusetts Institute of Technology looked at “fair-trade certified” apparel — clothing with a label certifying that certain labor and safety standards were observed during manufacturing. Researchers found that shoppers looking for the best bargain on a package of socks are less apt to buy the somewhat more expensive fair-trade option, while a shopper buying a more expensive item might spend a little extra for one that was fair-trade certified.

A separate study conducted in 2011 by Harvard, MIT and the London School of Economics found the fair-trade certified label has a large positive impact on sales. A substantial segment of consumers are willing to pay up to 8% more for a product bearing the fair-trade label, the study found. This explains why many companies display the fair-trade designation on their packaging and in their marketing materials to attract customers.

But many experts remain skeptical that the designation makes that much of a difference to customers. “There is a segment of upper-middle-class customers who care. They don’t even need to be wealthy — they can be poor graduate students, but because of their sensibilities, their awareness, what they read and who their peers are, they are willing to pay five cents more for a cup of fair-trade coffee. But that is not where the money is made, and companies know that,” says Chakravorti. “Most customers will not pay more [for a socially responsible product].”

Wharton’s Reed agrees. “There is a huge difference between what people will write down on a survey because it looks good, and what they will do when it comes to reaching into their own pocketbook and paying for something,” he says. “It is easy to say they would want to buy something that’s not been made with exploitative labor, but they don’t necessarily want to pay more for the stuff. People vote with their dollars.”

Employees, however, are a different matter, he notes. CSR programs provide a competitive advantage in workforce recruitment. According to a study last year by Nielsen, the media company, 62% of people surveyed said they prefer to work for companies that have implemented programs to give back to society. A separate study last year by LRN, a provider of compliance management applications and services, found that 82% of American workers said they would be willing to be paid less to work for a company with ethical business practices than receive higher pay at a company with questionable ethics.

“You want to attract people who buy into the beliefs of the organization,” says Reed. “The most effective employees are not just doing a job; they believe they’re doing something that reflects who they are. They take less money; they work harder; they stay around longer. The company wants to attract people whose value system is consistent with its own.”