It's all about self awareness and deep understanding of the impossibility of perfection. Sometimes we just tend to behave straight, sometimes not; that's what we learn to contemplain or practice along the ever-changing journey of growing up.
Self awareness yes - For me, it’s more understanding the “social norm” and understanding when not to say things. After all, I had a lot of antisocial personality traits as a kid, so these things did not come naturally.