Prior to David Peter's invention of solid milk chocolate in 1875 chocolate was known as a drink. One of the challenges of making the, now familiar, milk chocolate bar was reducing the water content of the milk to make it easier to emulsify and set the chocolate. This had to be done in a way that kept the creaminess and didn't burn or scorch the milk and that wouldn't spoil. The Swiss got there first it. Cadbury figured it out (or just copied the Swiss). Hershey struggled. He had a chocolate manufacturing plant that was closely guarded not to avoid someone stealing his chocolate recipe but to avoid anyone discovering he didn't have one.
One day in 1904 he cracked it & depending on who you believe, either by perseverance or by parsimony. Hershey's advocates will tell you that late one night, after many failed attempts he & his colleague John Shmalbach discovered just the right slow evaporation of non-fat milk that produced a creamy, faintly bitter chocolate. Hershey's detractors will tell you how a tight-fisted Milton Hershey did not want to waste a large delivery of milk powder that had soured and instead used it & found it sold surprisingly well. Either way that's when Hershey's distinctive "sour" flavour was introduced.
Then the Great War happened. Supply problems & rationing hugely restricted Cadbury & the other European manufacturers. Hershey, despite producing what many thought was a worse product had fewer supply issues and, without European competitors, a US market largely to himself. By the time Europe has finally picked itself up after the Second World War the American palate and taste for chocolate has long since been fixed.
TLDR: Americans have terrible chocolate because in 1914 a Moravian took a wrong turn and got an Austrian shot by a Bosnian
p.s. I love chocolate. I can't stand Hersheys.