The reason for the prohibition is simple: if you were watering beer, by adding sugar you could get the gravity back to the right level. Should the weights and measures people pay a call and sample the beer, the fraud might go undetected.
That's what I assume was going on here:
"THE MANUFACTURE OF LONDON PORTER.
Before a full bench magistrates in Dundee, John Blair, retailer of beer, Scouringburn, was charged with having in his possession 8.5 gallons of emgas in solution, the same being a preparation used as a substitute for malt, whereby he had rendered himself liable to a penalty of £200. Among the witnesses examined was Henry Burge, an analyst from Somerset House, who had analysed the substance in dispute, and found that it was a chemical composition, identical with a superior kind of molasses, admtted that it would be a very suitable substance for mixing with porter shortly before tapping the casks, or shortly before bottling. It would give it a "nice brisk head and a brilliant appearance." This sugar was extensively used among dealers in London for giving a head and brilliancy to their porter. The use of it was not permitted by the Excise, and during the last two years something like 500 prosecutions had taken place in London for using sugar and water for that purpose. If the preparation had been put into a cask which had previously contained porter, and where there was a little dry yeast, that would be sufficient to start fermentation. The Court found Blair guilty of having a solution of sugar in his possession as a substitute for malt, and imposed the modified penalty of £20, or one month's imprisonment. Notice of appeal was given."
Shields Daily Gazette - Wednesday 25 July 1883, page 3.
It sounds like he was lucky to get away with just a £20 fine. Which was still a hefty amount. But £200 would have been a couple of year's wages.