The industrial revolution improved productivity and made sugar more affordable to the masses. Prior to that, only the aristocracy could afford it. It is said that King Louis XIV of France had rotten teeth, and bad mouth breath because of his overindulgence of sugar.
Later on, the discovery of HFCS (screenshot) and government subsidies made it even more affordable...