In an effort to improve its reputation, Walmart recently ran an ad campaign in which CEO Doug McMillon spoke about the company’s commitment to its workers.

Companies have always been concerned with appearing to do the right thing—and, perhaps, with really doing it. In a 1998 paper, John H. Hamer examined what social responsibility looked like to the American industrialists in the nineteenth century.

Hamer begins his story with John Crozer, a textile manufacturer and lay preacher in the pre-Civil War years. In this era, Puritan-influenced faith and money-making went hand-in-hand. “The laws of supply and demand were considered as anchored in nature, and the wealthy through the prestige connected with their wealth, were considered the natural rulers of the people,” Hamer writes.

Crozer’s work on behalf of his community—starting Sunday schools for the children of workers at his mills and rebuilding infrastructure in one town—could be seen as a cynical ploy to encourage worker loyalty. Indeed, some workers in the 1830s referred to him as a “lordly oppressor and tyrant.” But his actions were consistent with a worldview that saw both economic and religious salvation in promoting hard, sober work.

For a number of business leaders in the late nineteenth and early twentieth century, philanthropy was in conflict with their personal beliefs.

Capitalism changed after the Civil War. Enterprises grew in size and expanded to a national scale. Rationalization and efficiency became watchwords for businessmen. While the public as a whole remained highly religious, secular theories like social Darwinism gained credence among industrialists and elites. As bankers and moguls gained power, the Progressive movement arose, calling for government to act as a counterweight to Rockefeller and the railroad barons.

In the 1890s, the first public relations professionals began advising the wealthy on how to use philanthropy to placate the public. Many Gilded Age industrialists, like John D. Rockefeller and Andrew Carnegie, donated money to support cultural institutions and scientific advancement.

Hamer suggests that these men were motivated not just by public relations concerns but also by their own moral codes. Rockefeller’s Baptist faith, for example, taught him that his monopolistic business practices were in line with Godly behavior, but also that he was obligated to contribute to his church and to social causes.

On the other hand, to a number of other business leaders in the late nineteenth and early twentieth century, philanthropy was in conflict with their personal beliefs. Hamer writes that Wall Street investment speculator Jay Gould “considered philanthropy hypocrisy, and the future of the public dependent upon his willingness to take business risks.” Meanwhile, Cornelius Vanderbilt demonstrated that he wasn’t worried about looking like a bad guy. He won public favor by reducing transportation costs, but, once the price cuts had driven competitors out of business, simply hiked them again. “He cared nothing for public affairs, business ethics, or charity,” Hamer writes.

Today, the growth of global, publicly financed companies has further rationalized the business world. It’s up to consumers to decide whether or not efforts like Walmart’s are cynical public relations ploys or genuine attempts to do what is right.