 If you dig down to where the core of sin is, it's going to be pride and or selfishness. It's going to be the root of all sin. And our self-righteousness is very much rooted in pride. Romans 8, 3-4 says, "...for God has done what the law weakened by the flesh could not do."