Why do people tend to bring up their past traumatic experiences when they are being held accountable for something wrong they did?

For some context;
Recently a guy made me feel uncomfortable cause he was touchy feely even though he was aware I had a boyfriend. When he got called out he suddenly started talking about his dad's abusive nature and how he's seeing a psychiatrist cause he has serious issue.

Why couldn't he just acknowledge his wrong doing without having to bring up his past trauma?
Is this him trying to defend and justify what he did?
Why do people tend to bring up their past traumatic experiences when they are being held accountable for something wrong they did?
Post Opinion