The story
From magic + sugar, due to it being a potent, inexpensive, and calorie-free sweetener that provides a strong sweetening effect, making it an appealing substitute for regular sugar, especially for street food vendors selling sweet drinks and pastries.
Etymology from Wiktionary, CC BY-SA 4.0.