It's one of those things that help your cosmetics not to go wrong too soon, aka a preservative. It can be naturally found in fruits and teas but can also be made synthetically.
No matter the origin, in small amounts (up to 1%) it’s a nice, gentle preservative. Has to be combined with some other nice preservatives, like potassium sorbate to be broad spectrum enough.
In high amounts, it can be a skin irritant, but don’t worry, it’s never used in high amounts.