This is a story about corporate and investor strategy, government meddling, and chocolate. (Cue Homer Simpson…)

It involves the Hershey Company, the pioneering U.S. chocolate maker. Typically, Hershey is the top seller of candy in the United States—but it is not the largest U.S. candy maker. That distinction goes to its bitter rival, Mars Inc., which has larger global sales. (For a history of the rivalry, including tales of corporate espionage, see Joël Glenn Brenner’s The Emperors of Chocolate.)

Hershey has long wanted to expand its global sales, in part to diversify away from its exposure to the U.S. business cycle. Toward that end, in 2010 the firm tried to buy UK-based Cadbury, a seemingly ideal acquisition since Hershey already holds the license to make Cadbury candies for the U.S. market. But Kraft Foods ultimately outbid Hershey for Cadbury and later spun off much of the acquisition and some other Kraft ventures to form the snack maker Mondelēz.

Hershey has also looked to expand its position in the American market. Earlier this year, it made a play for the U.S. division of Switzerland-based Nestlé, but again lost out, this time to Italian firm Ferrero (the maker of Nutella). But Hershey has been successful with smaller acquisitions, picking up boutique confectioners Scharffen Berger in 2005, Dagoba Organic Chocolate in 2006, and Brookside Foods in 2011.

The firm has interests beyond chocolate; purchasing Mauna Loa Macadamia Nut Corp. in 2004, Krave Jerky in 2015, and Amplify Snack Brands (the maker of SkinnyPop) in 2017. It also once held the Friendly’s restaurant chain and the pasta-maker that produces Ronzoni and San Georgio dried pastas.

Those non-chocolate acquisitions should raise an eyebrow.

The finance literature generally takes a skeptical view of mergers and acquisitions (M&A). To understand why, imagine that Megacorp has its eye on Independent Inc. Roughly speaking, Independent’s shareholders should only sell if Megacorp offers payment greater than the present value of Independent’s expected future returns. And Megacorp should offer such payment only if it’s less than the present value of the expected returns from the acquisition.

Acquiring firms often claim they can perform such magic. The combined firm will attract better financing, they say, or enter new markets. Or the acquiring firm’s management skill will improve the target firm’s efficiency. Or the acquiring firm has shrewdly negotiated a heavily discounted purchase price. “Synergy” gets tossed around a lot.

Sometimes that magic happens, but other times it proves to be an illusion. Acquiring firms are susceptible to the winner’s curse, over-bidding for the target either because the acquirer overvalues the target or overrates the acquirer’s ability to boost the value of the newly combined firm. Empirical work on M&A suggests that acquirers’ shareholders tend to lose out on these deals while target-firm shareholders tend to benefit (see Malmendier, Moretti, and Peters)—though this conclusion is not unanimous (see Wang).

My sense of the literature is that M&As are more likely to succeed when the acquirer and the target are in the same business, and thus can combine their expertise, reduce overhead, and increase their market power as both a buyer and seller. An example is Exxon and Mobil’s 1999 merger, which combined Exxon’s renowned management skill with Mobil’s strong innovator talents. M&As also are more likely to succeed when the acquisitions are small. Hershey’s purchases of Scharffen Berger, Dagoba, and Brookside may fit both of these categories.

But otherwise, M&A get dicey. Among the legendary disasters are AOL–Time Warner and Enron’s expansion into metals, water service, and fiber optics. General Electric once was hailed for its magic conglomerate touch, but not anymore, and Disney may be losing its touch. Even mergers of firms in similar businesses can lead to disaster, as exemplified by Sears–Kmart, Daimler Chrysler, Sprint–Nextel, Bank of America–Countrywide, and the New York Central and Pennsylvania Railroads.

So why do corporate officers pursue M&A? One possible explanation should sound familiar to students of public choice: corporate officers want the prestige—not to mention the compensatory rewards—of completing news-generating megadeals and leading ever-larger and more visible firms. Unfortunately, their gain can come at shareholders’ expense.

But, M&A supporters might respond, shareholders can benefit from such acquisitions: the combined firm’s different business lines diversify its revenues, making it less susceptible to a particular industry’s cycles. Prima facie, this idea seems to have merit; wise investors diversify their portfolios, after all. But that underscores why firms shouldn’t engage in such M&A: shareholders can diversify on their own and don’t need firms to do so on their behalf. The shareholders seem to be better off when firms “stick to their knitting,” working to prosper in their particular industries.

But in Hershey’s unique case, diversification through M&A may have merit.

The Hershey Company’s most prominent shareholder is the Hershey Trust, a philanthropic trust established by Milton S. Hershey himself over a century ago. The Trust oversees and finances the Milton Hershey School, which cares for and educates disadvantaged youth. A board of directors oversees the Trust and, because it is a state-chartered charity, the Pennsylvania Attorney General is responsible for ensuring that the directors abide by the charter. M.S. (as Milton Hershey is still affectionately called in central Pennsylvania) apparently thought the combination of public and private authority over the Trust would help it remain faithful to his vision.

Generally speaking, this appears to have worked. The Milton Hershey School is well respected, with a campus that looks a bit like MIT’s and an endowment to match. Moreover, following M.S.’s personal example, the Trust, Hershey Co., and their employees are generous benefactors of the town of Hershey, supporting all sorts of civic activities, holding public officials accountable for schools and infrastructure, and simply handing out lots of free chocolate. (My wife and I moved to the area in part to enjoy Hershey’s many positive externalities.)

That’s not to say that there hasn’t been mischief over the years. The Trust board has made some questionable uses of the Trust’s money, for instance. And Pennsylvania’s AGs have taken some suspect actions and inactions concerning the Trust.

Among the AG mischief is obstructing Trust efforts to sell its Hershey Co. shares. The Trust’s motivation to sell is the same as any long-term investor: to diversify its holdings and reduce variation in its revenue stream. Though the Hershey Co. has many shareholders, the Trust holds special shares that give it roughly 80% of shareholder voting rights. Any good Pennsylvania politician—and an elected AG must be a good politician—would loathe seeing the Trust unload its shares for fear that jobs, spillover benefits, and the Hershey Co. prestige would decrease or leave South-central Pennsylvania altogether. In 2002, then-AG Mike Fisher (who had designs on the governor’s mansion) blocked a rumored Hershey sale, and in 2016 the AG’s office (then nominally headed by Kathleen Kane, but transitioning) apparently strong-armed the Trust’s board to back away from a sale to Mondelēz.

So if the Trust can’t diversify its assets, then it would be helpful if the Hershey Co. were to do so through M&A. The Trust and Company have different boards with different fiduciary responsibilities (though also some shared members) and Hershey Co. managers answer only to the company’s board; the latter board is certainly mindful of the former’s concerns. That may explain some of the Hershey Company’s M&A interests.

To be clear, this is my theory of what’s driving some of the Hershey M&A activities. No official at either the Trust or the Hershey Co. is on record professing this strategy, and Hershey Co. officials are responsible to all of the firm’s shareholders, not just the Trust. Still, my theory nicely fits the facts and the finance literature.

And it leads to a question: If I’m right about this strategy, is it good for other Hershey Co. shareholders?

It may be, at least in some cases. The Trust’s inability to diversify makes it a well-motivated activist investor, carefully watching over the Hershey Co. So, for instance, the Trust is rumored to have restrained Hershey Co. executives from getting into a bidding war with Kraft over Cadbury and risking falling prey to the winner’s curse. On the other hand, the Trust’s inability to sell its control over the Hershey Co. means other shareholders can’t benefit from such a sale—remember, target-firm shareholders tend to make out better than acquiring-firm shareholders. And, of course, Hershey M&A risk the same problems that befall other firms’ M&A.

To this outsider (and non–financial adviser), the Hershey Co. appears to be a well-run and increasingly marketing-savvy firm. Also, it performed well during last decade’s recession, suggesting it has some countercyclical value. (In tough times, Americans apparently reach for a Reese’s Cup—and who can blame them?) Those features are appealing for certain groups of investors. But those investors—not to mention the Hershey Co., the Trust, and the disadvantaged children it supports—would all be better off if politicians were to respect the Trust’s right to make investment decisions like any other shareholder.