How did English pepperoni come to mean something entirely different from Italian peperoni?

The earliest attestation in the OED comes from 1888, in the Times (of London):

There were peperoni, sometimes called diavolini, and poponi.

It is widely believed that the product is "purely an Italian-American creation", although it is related to various types of salame/salsiccia piccante of southern Italy.

Note that some recipes have a mix of both "sweet" bell peppers and spicy chili peppers, and there is substantial variation within Southern Italy. The DOP-certified Salsiccia di Calabria is permitted to be flavoured with chili pepper or black pepper, and thus varies in colour.

Interestingly, according to the OED, for pepperoni = spicy sausage:

[...] the Italian word is apparently not attested in this sense.

This corroborates with what is said by Treccani.it. However, the word peperone was formerly used to designate both bell peppers and hot chili peppers, as attested by this 2019 article from Una Parola al Giorno and page 127 of Elementi di agricoltura pratica esposti con nuovo metodo from 1843:

Il peperone pel suo sapore bruciante ed acre è creduto da molti nocevolissimo, ma in effetti è purgante, facilita la digestione, non grava affatto lo stomaco, ed eccita l'appetito.

The pepper, due to its burning and acrid taste, is believed by many to be extremely harmful, but in fact it is purgative, facilitates digestion, does not burden the stomach at all, and excites the appetite.

This mid-19th century tome also mentions as one of the types the peperone corniculato, lit. "horn-shaped peperone", which can be identified as the chili pepper in more modern parlance.

Hence, there has been a classic case of divergence: modern standard Italian has narrowed the definition of peperone to the sweet bell pepper, with the diminutive peperoncino taking over the (generally smaller) chili pepper, sometime in the late 19th century. Meanwhile, some kind of sausage product with chili pepper was presumably being sold in Italian-American communities using an older definition of pep(p)eroni: however, this step is as yet unattested in print media. By 1888, the truncated version in English was being reported on by the Times.