Hershey’s chocolate pre-dates powdered milk, so the milk chocolate had a sour taste due to being made with not fresh milk. Today Hershey purposefully incorporate this flavor profile into their milk chocolate because it’s their signature milk chocolate flavor.
m&m’s are a Mars product, but they were originally a collaboration between the two companies using Hershey’s milk chocolate. Today Mars purposefully incorporates this flavor profile into their m&m’s chocolate blend to maintain this signature flavor, but in America only. m&m’s made in France do not use this sour flavoring.