Dementia Support Group
Dementia is the progressive decline in cognitive function due to damage or disease in the brain beyond what might be expected from normal aging. Particularly affected areas may be memory, attention, language and problem solving, although particularly in the later stages of the condition, affected persons may be disoriented in time, place and person (not knowing who they...

My guess is that as more of the brain dies the person loses more of the executive portion that controls appropriate behavior. The is also the cause of inappropriate sexual comments and outbursts.
The most important thing is to protect yourself. Sometimes medication can help or if necessary a change in living arrangements.
The location of the atrophy decides the behavior affected by the disease. My mother has frontotemporal atrophy, particularly in the right hemisphere, and that greatly decreases her ability to provide empathy and reasoning with her actions. The brain is highly specialized, so damaging one portion of it can have very specific results. You also need to realize that when one portion is damaged, other portions will tend to compensate for the loss (much like how people who become blind become more apt with auditory cues). This may tend to amplify other behaviors (hypersexuality, obsessive compulsiveness, etc).