Modern chemistry can analyze almost any ingredient made by Mother Nature and determine its chemical structure, i.e. how various elements in a molecule connect to each other. Once the chemical structure is known, these ingredients can be synthesized in the lab from other ingredients that can be natural or synthetic themselves.
Chemical synthesis can provide nature-identical materials from ingredients that are more easily available, thus reducing the cost and increasing the availability. For example, sandalwood oil is obtained from sandalwood trees, which are now almost extinct.
Sandalwood oil, a chiral ingredient, can be synthesized in the lab from ingredients that are not obtained from a sandalwood tree Synthetic sandalwood oil can thus reduce the need to destroy the sandalwood trees that remain in the world. Cost can also be an issue with some natural materials. L-ascorbic acid (vitamin C) is too expensive to be extracted in large quantities from various fruits, so it is made from sugar by fermentation.