It didn't become generally available until about a century and a half ago. Before manufactured sugar became available, people used honey. Today sugar is a major product and is derived from several plants.
Sugar occurs in small amounts in most plants.
In the plant, sugars are converted to starch for storage as an energy reserve. This process is reversible. Enzymes catalyze the reaction. Sugars are water soluble, whereas starch is not. The process also can be catalyzed chemically.