Discover is not the right word, those plants have been around since Man Invented Fire. It was one plant, now it happens there are strains, potency, medicinal effects... No one mentions it was well known as a hunger inductor and sold as syrup decades ago.
Also religion said it was Satan's plant with all the propaganda they had going.
According to this it is the reason it was made illegal.
https://www.livescience.com/56600-odd-facts-marijuana/2.html
In many ways, the move toward legalization of marijuana, particularly medical marijuana, is a return to the status quo … the very long-ago status quo. In America, before the 1906 Pure Food and Drug Act, cannabis was a common ingredient in medicinal tinctures, and sellers didn't even have to mention it on their labels.
During the 1920s and 1930s, though, Mexican immigration to the United States spiked as a result of the Mexican Revolution, according to
PBS Frontline. People moving from Mexico brought along the custom of using marijuana recreationally, and the drug became linked with public fears of the newcomers.
According to U.S. Customs and Border Protection, the federal government waffled on making marijuana illegal even as states enacted their own laws — a strange mirror image of the legalization process going on today. Nevertheless, Federal Bureau of Narcotics Commissioner Harry Anslinger campaigned to quash recreational marijuana, an effort that led to the Marihuana Tax Act of 1937. This law allowed for the importation of marijuana, but heavily taxed it, making it too expensive for recreational use.
I think big oil played a part it making it illegal also. Due to hemp being cheaper and easier to run in automobiles.