Because ginger contains two ingredients, one is fragrant and the other is spicy. The aromatic component is volatile oil, the content is about 25 ~ 30%, and the main components are gingerol terpenoids, camphor tree shade, gingerol and so on. The irritating component, capsaicin, is an oily liquid, also called gingerol, which is a mixture of crystalline gingerol and oily gingerol, and its content is about 1.5%.
Aromatic volatile oil can promote blood circulation, so after drinking ginger soup, I feel warm all over, which has the effect of preventing and treating colds. Its pungent flavor can reflexively increase the secretion of gastric juice, which has the function of invigorating stomach and regulating gastrointestinal function.
As for why coke is used, I think, firstly, it is a trick played by children. Children don't like ginger, but they like coke.
Second, coke replaced sugar.