It's rude to make light of tragic situations.
Joe's mother just died, and he just told Anne.
Anne wants to help Joe feel better.
Anne offers to listen to Joe's feelings without judgment.
Anne cracks a joke about Joe's mother.
Joe feels supported and trusts Anne.
Joe is shocked and offended and begins crying.