I suspect the writers of the show didn't remember their chemistry correctly.
If you add concentrated (> 92% active in water) sulfuric acid to sugars such as glucose, sucrose, and dextrose, the sugar dehydrates significantly and swells into a blackened chunk of carbon (see link)
http://jchemed.chem.wisc.edu/JCESoft/CCA/CCA5/MAIN/1ORGANIC/ORG18/TRAM18/A/PICTURE.HTM?1Hydrochloric acid cannot do this because you cannot increase the concentration significantly above 37% active in water. The sugar cannot dehydrate effectively in the presence of a lot of water.
Mr. Spindlelegs