> Now I wonder who invented [...] sugar (used to make cake)?
If you're talking about the refined product, then India. If you're talking about the plant, then New Guinea and Taiwan.
https://en.wikipedia.org/wiki/History_of_sugar