Our Gemara on Amud Beis discusses an incident that occurred to “a certain pious individual” “chassid echad”, who was involved in a purchase transaction, and there was question as to whom he should pay. There was a debate about whether the case involved a false oath. The Gemara challenges this position, because the litigant was described as a pious person. The Gemara then says, perhaps this situation came up after he repented and became pious, earning the title of chassid by the time of the legal proceedings. The Gemara replies that this cannot be so, as we have a tradition that every time the rabbinic corpus uses the moniker “a certain pious person” it is either Rabbi Yehuda ben Bava or Rabbi Yehuda, son of Rabbi Elai, thus the case could not have involved a false oath.
The Gemara in Succah 53a) states:
The pious and the men of action would dance before the people who attended the celebration. The Sages taught in the Tosefta that some of them would say in their song praising God: Happy is our youth, as we did not sin then, that did not embarrass our old age. These are the pious and the men of action, who spent all their lives engaged in Torah and mitzvos. And some would say: Happy is our old age, that atoned for our youth when we sinned. These are the penitents. Both these and those say: Happy is he who did not sin; and he who sinned should repent and God will absolve him.
Rashi (ibid) says that “chassid” “pious man” always connotes one who is fundamentally pious “chasid meikaro”, therefore they look at their youth with contentment. Chasam Sofer (ibid) asks, our Gemara in Bava Kamma (103) indicates that a chassid can also be a penitent, as the Gemara only rejects this possibility due to the tradition that “chassid echad” is always either Rabbi Yehuda ben Bava or Rabbi Yehuda, son of Rabbi Elai.
Some commentaries answer that “chassid meikaro” more correctly translates as “fundamentally pious”, not “originally” or “always pious”. Therefore, Rashi only meant relative to the penitent, the chassid does not look back at his youth with regret, as he was fundamentally pious. This does not rule out that somehow a formerly sinful person could still achieve the level of chassid.
This is an important distinction. The pre-requisite for being pious is not necessarily to be free of sin, however there must be a certain depth of wisdom and basic decency in order to properly act pious. As Mishna Avos (2:5), “ An ignorant person cannot be pious”. From a psychological perspective, we might say that to be pious one must be mostly free from personality and character flaws, which are fundamental. When a person has an imbalanced personality, though he or she may believe that his behavior choices, or interpretations of the actions of others, are based on piety, it may be the opposite. Sin is behavior and can be changed, but distorted beliefs and forms of attachment, are much harder to correct because these are the cognitions and feelings that drive, and even justify the sin. Such attitudes are modeled and internalized from our family and social milieu, which underscores the value of a healthy upbringing. While it is not at all impossible to change, it does require reevaluation of the basic assumptions and beliefs that lead to the behavior. If your instrumentation gives you false data, your actions will follow the faulty readings instead of reality.