The pain begins when the tooth's outer shell, the enamel, is worn thin. When sugar comes into contact with exposed nerves in the cavity, it hurts. Plus, bacteria in our mouths eat sugar and release acids, which makes it hurt even more.