This is actually a pretty mainstream therapeutic strategy in medicine - and especially psychiatry.
The ideal is to use a milder or temporary disease to treat a more severe or permanent disease.
1. Malarial therapy of GPI (general paralysis of the insane - cerebral syphilis)
Patients with incurable and fatal GPI were deliberately infected with malaria. The very high pyrexia (temperature) killed the syphilis germ, but (hopefully) not the patient. The patient was then (hopefully) cured of their malaria using quinine.
2. Leucotomy/ Lobotomy
Patients with chronic and incurable anxiety or tension were deliberately given brain damage, cutting off the frontal lobes of the cerebral cortex from the rest of the brain. This made the patients docile and indifferent - which was presumed to be an improvement. The procedure became so popular that brain damage was inflicted on patients with less severe and probably temporary anxiety and other conditions too.
3. Neuroleptics/ Antipsychotics create Parkinson's disease for the treatment of fear, agitation, delusions and hallucinations, and hyper-activity
Patients with a range of very distressing psychological and psychotic symptoms were deliberately made to suffer from Parkinson's disease by giving them dopamine blocking drugs. As well as producing the physical symptoms of Parkinsonism (tremor, stiffness, movement disorders), the drugs produced the psychological symptoms of Parkinsonism - emotional blunting and demotivation. Patients could no longer be bothered to respond to delusions and hallucinations.
Unfortunately they could no longer be bothered to do anything else, either and became asocial, withdrawn, idle, and without the ability to experience pleasure. Also the drugs were found to have a permanent effect (tardive dyskinesia) and to create dependence - such that withdrawal caused a psychotic breakdown.
In a recent development neuroleptic/ antipsychotic drugs are being given to tens/ hundreds of thousands of over-active children (aka 'bipolar'). Parkinson's disease certainly puts a stop to these children's hyper-activity - and this is regarded as progress.
Some drugs 'normalise' the situation as their primary therapy - for example a narrow spectrum antibiotic (more or less) does this by killing an invading germ.
'Side effects' are often an instance of the phenomenon. Epilepsy may be prevented, at the cost of causing chronic sleepiness. Pain may be alleviated, at the cost of causing reduced alertness and constipation, or stomach pains and potentially ulcers.
Ideally the side effects are less severe than the original pathology, and temporary - but unfortunately this doesn't always happen.
Examples also occur in surgery: treating colon cancer by removing the colon - creating a disease state (colostomy etc.), but often saving the patients life - the same applies to many 'resections'.
Or in plastic surgery, face wrinkles are treated by causing muscle paralysis (using 'Botox').
Indeed, 'curing. is relatively rare. Medicine is mostly about trying to relieve symptoms, or choosing the least worst of several pathological alternatives.