The Top 20 Most Generous Companies Gave $3.5 Billion to Charity Last Year by Caroline Preston @FortuneMagazine June 22, 2016, 10:26 AM EDT E-mail Tweet Facebook Linkedin Share icons Roy Castro never finished high school. But earlier this month, he gave the graduation speech for his class of 33 participants in 10,000 Small Businesses, an intensive entrepreneurship program funded by Goldman Sachs gs . Behind a lectern at LaGuardia Community College in the borough of Queens in New York City, Castro told the crowd that he was on track to grow his $6 million ice cream distribution business by 20% and add another five employees before year’s end. He credited the curriculum’s lessons in financial modeling, growth plans, and business negotiations. Goldman’s advisors for the program, CEO Lloyd Blankfein, former New York City mayor Michael Bloomberg, and Berkshire Hathaway brk.a CEO Warren Buffett, looked on. “I’ll never approach business the same way again,” said Castro, who spent a decade in prison before he was able to reroute his life and buy D&M Ice Cream. “Look at some of my new friends. Wassup Warren.” The program pays dividends for Goldman, too. Unveiled in 2009 amid blowback over big bonuses for bankers, 10,000 Small Businesses has brought reputational rewards. The bank, a symbol of Wall Street greed, now has boosters—some 6,300 graduates to date—on main street. (Dina Powell, who leads the firm’s philanthropy initiatives, says programs like 10,000 Small Businesses build upon Goldman’s 145-year legacy of giving). The company’s employees provide coaching to entrepreneurs enrolled in the program, helping to improve job satisfaction. And, Powell says, Goldman is producing a measurable impact on small business development, which is key to U.S. economic growth (and to the financial success of big banks). According to a study commissioned by the firm, 69% of participants reported increasing their revenues within six months of graduation. Goldman was the fourth-biggest corporate donor to charity last year, according to an analysis by The Chronicle of Philanthropy. The firm gave $276.4 million in cash in 2015, a 10% hike over the previous year. As a comparison, last year Gilead Sciences gave the most monetary contributions, with $446.7 million. Rounding out the top five were Walmart wmt with $301 million, Wells Fargo wfc with $281.2 million, and ExxonMobil xom with $268 million. See the full list of The 20 Most Generous Companies of the Fortune 500. Like Goldman, many Fortune 500 corporations report that philanthropy and social responsibility programs help their business by enhancing employee satisfaction, improving customer loyalty, and alleviating social problems that could pose financial liabilities. Take the No. 2 giver, Walmart. Employee turnover has risked becoming a drag on the retail giant’s business operations. In part to slow the churn, Walmart’s CEO, Douglas McMillon, announced in February 2015 a plan to raise wages for its low-income workers and provide more flexible scheduling. Around the same time, the company’s charitable arm, the Walmart Foundation, unveiled a $100 million pledge to make retail jobs more attractive industry-wide. “We want to accelerate mobility of frontline retail workers not only within Walmart but in retail as a whole, and really elevate the role that retail can play in workforce in America and more broadly,” says Kathleen McLaughlin, who serves as both chief sustainability officer and president of the Walmart Foundation. The foundation’s $10.9 million grant to the Chicago Cook Workforce Partnership is intended to develop training for retail workers who want to advance beyond entry-level and connect new employees with their first retail jobs, and to help fix a skills gap between U.S. workers and corporate employers, she says. There’s evidence that this strategic approach to giving is both smart business and smart philanthropy. “If companies are going to do philanthropy, it’s better that they are focusing on issues related to their businesses,” says Andrew Crane, director of the Centre for Excellence in Business at York University, in Canada. “It means they have specific expertise to contribute.” But some consumers may prefer pure altruism. Given Goldman’s contributions to the 2008 financial crisis, and Walmart’s alleged role in undermining worker compensation, critics say it’s easy to see this ilk of corporate generosity as little more than band-aid solutions on wounds the businesses helped to create. “Bottom line,” says Crane, “it would be better if big companies had a more responsible attitude to paying corporate tax and conducting their business in a responsible way so that such problems could either be averted in the first place or governments were suitably resourced to deal with them.” It’s also not clear that companies’ rhetorical commitment to doing well by doing good has translated into more generous gifts to charity. The Chronicle’s analysis of the philanthropic practices of 68 corporations on the Fortune 500 list showed a modest uptick in giving last year, 2%. But in historic terms, corporate giving as a percentage of pre-tax profits is falling. Giving USA, an annual barometer of charity, reports that business giving declined from an average of 1.4% of pre-tax profits in the mid-80s and 90s to 0.8% in the past decade. Rob Reich, a professor of political science at Stanford University and co-director of the Center on Philanthropy and Civil Society, says the “public’s attitude toward corporate philanthropy should not be default gratitude.” Just like other tax-subsidized expressions of generosity, business giving should be scrutinized to determine its actual benefit to society. In the case of Goldman’s small business program, it’ll be up to entrepreneurs like Castro, the ice cream distributor, to demonstrate that long-term return on investment. Check out the full list of The 20 Most Generous Companies of the Fortune 500 to see more about the non-profits and charities that benefited from $3.5 billion in donations last year.