Those who rely on doing what is right to establish their righteousness, will always have a shock. Legalistic righteousness is a matter of knowing the law and being disciplined to fulfil the rules and regulations. It is about always keeping the rules, all the time with no exceptions. But nobody, except Jesus, can live a completely perfect life (Romans 3:23), and so every time they fail to do right, they invite the weight of the law to condemn them.