Caffeine and alcohol are also both drugs. Drug doesn’t mean “bad”, it just means a chemical or substance that causes a physiological change in the body. Most druge out there aren’t illegal, they’re prescribed as medicine.
Wikipedia:
A drug is any chemical substance that when consumed causes a change in an organism’s physiology, including its psychology, if applicable
Dictionary.com:
Pharmacology. a chemical substance used in the treatment, cure, prevention, or diagnosis of disease or used to otherwise enhance physical or mental well-being.
Cambridge Dictionary:
any natural or artificially made chemical that is used as a medicine