Some people become highly defensive or offensive when they want to hide something from you, or lie to you, or don’t want to be vulnerable with you, because it’s too scary for them.
No matter the reason, their behavior has a purpose and it’s usually to divert your attention so that they don’t have to reveal something that might make them feel out of control.