This class of drug is a prophylactic for malaria. It, or one of its equivalents, is commonly given to you if you tell your doctor that you are traveling to a part of the world where malaria is currently endemic. It isn't the kind of drug where they worry much about abuse or misuse, as it is cheap and ubiquitous in the developing world.
Tonic was invented to make quinine palatable to British soldiers in India. About three minutes into the scheme, someone added gin.
So quinine is indeed arguably the original “active” ingredient, sugar was second (to mask the flavor), and alcohol “let’s just pretend this isn’t happening” was third.
GPs won't prescribe on the basis that you might get sick and require a particular medication. You can't walk into your GP's office and ask for antibiotics, for instance.
My mistake, I didn't realise chloroquine was a malaria prophylactic (I've always been given other anti-malarials), I thought it was only a treatment for when you were actually diagnosed with malaria.
Under normal times, if you tell your doctor that you're planning on traveling, sometimes they'll ask if you want anti-malaria medication, and I believe chloroquine is one of the options they give you.