There can be many reasons for a head tilt, but it is usually due to a disorder of the parts of the brain which control balance (called the vestibular system and the cerebellum).
You can get deep inner ear infections that can cause a head tilt and deafness but this would likely resolve once the infection is treated.
Other causes could be more widespread infection or inflammation and this could happen directly to the patient itself ( eg feline infectious peritonitis or toxoplasmosis, but the patient would typically also be very sick or showing other signs) or to the pregnant mother and thus affect the growing fetus (such as in feline panleukopenia).
Other much rarer causes could be: Nutritional, anatomical abnormalities, degenerative conditions, tumurs, Idiopathic ( the fancy term for we don't really know), toxins and trauma.
Having had a patient caged for a long period of time should not have caused your cats problem.
I have several patients who were born this way have adapted amazingly well and are doing just fine. Their only limitations have been that they are kept as indoor cats and have extra large litter boxes as they found it hard to get in and out easily.
I hope this helps.