'Sanitary' is Latin for 'of health' — from 'sanus' (healthy). Kin to 'sane' and 'sanity.'
Relating to conditions affecting health, especially with regard to cleanliness and precautions against disease.
From French 'sanitaire,' from Latin 'sānitās' (health, soundness, sanity), from 'sānus' (healthy, sound, sane). The Latin word 'sānus' originally meant 'healthy in body' but extended to 'healthy in mind' — hence English 'sane' and 'sanity' come from the same root as 'sanitary.' The Romans treated physical and mental health as aspects of the same quality: a sound person was 'sānus' in both body and mind. The modern English 'sanitary' narrowed to mean
The Latin phrase 'mens sana in corpore sano' (a sound mind in a sound body), from Juvenal's Satires, uses the same 'sanus' root twice. When you say someone is 'sane,' you are using the same word as when you call a hospital 'sanitary.' The Romans would have found this obvious — for them, mental and physical health were the same kind of soundness, described by the same adjective.