Corporate philanthropy, business leaders would have us believe, is the ringing voice of a company’s social conscience. Exxon Mobil may stand accused of misleading investors and shareholders about what it knew about climate change, but the ExxonMobil Foundation’s multimillion-dollar contributions to end deaths from malaria and to train women in developing countries should, executives hope, balance the ethical ledger.

The same goes for the Walmart Foundation’s contributions to reduce carbon emissions in China and to protect wilderness areas in the United States, or the Dow Chemical Foundation’s contribution to Habitat for Humanity. These companies might be ruthless in their lines of work — fighting against environmental regulations or more stringent labor standards — but their foundations are in it to do good to the world.

Not entirely, it appears. Just months before the midterm congressional elections, a group of economists have published an analysis of how corporate America is spreading its philanthropic wealth.

Sifting through the donations to charity from 1998 to 2015 by foundations set up by the largest companies in the United States — those in the Fortune 500 or the Standard & Poor’s 500-stock index — Marianne Bertrand of the University of Chicago’s Booth School of Business; Matilde Bombardini and Francesco Trebbi of the University of British Columbia; and Raymond Fisman of Boston University detected a pattern of contributions to 1,087 charities linked to 451 members of Congress.