When a 2-year-old hits themselves when mad, it could be due to their limited communication skills. They may not have developed the ability to express their emotions effectively yet, resulting in self-hitting as a way to release frustration or seek attention.