I've always found it a bit of a mystery. My dad had scabies, years before he had dementia. They said he'd got it through physical contact with someone who had it .... but dad at that time had physical contact with no one (sad in itself, but true). We didn't know what it was at first, and it had really taken hold on him, he was absolutely covered in it. The GP had him in hospital, and I sat holding his hand and looking after him for several days until they worked out what it was. I never got it.
The most alarming thing was that dad was so infected with it it made him very confused and hallucinating - stuff I came to see as normal when he got dementia, but it was one hell of a shock at the time.