There is an old rabbinic anecdote about a rabbi who was called on to deliver a eulogy for someone who had no redeeming social value whatsoever. The rabbi was hard pressed to think of anything positive to say about this person. So when he spoke he solemnly pronounced: “No matter how evil the deceased truly was, he was still a far better person than was his brother!”
“At the time that my wife and I made aliyah, the Ministry of Interior required certification through the chief rabbinate that any new immigrants were Jews in order to qualify for citizenship and immigrant benefits. After an hour-long wait at the ministry to be interviewed, my wife and I sat before a hard-faced clerk. I did not have a letter from a rabbi certifying to my Jewishness, but I felt confident that since I was on the chief rabbinate's list of approved rabbis whose letter would be accepted to verify the Jewishness of others, I would suffer no problem.
All societies survive through the retention of customs and traditions. If ritual law, halacha and Torah observance are the keystones of Jewish existence, the customs and traditions of Israel are the chain that has kept Israel bound to the Torah and its laws and values. The rabbis called the customs and traditions of Israel "the lessons of your mother" - in contrast and at the same time complementing "the teachings and disciplines of your father."
Legends are necessary for nation building and community cohesiveness. Legends of holy and pious people and legends about villains and the wicked are often subject to fabrication and gross exaggeration, but they leave no doubt in the minds of later generations as to who was the holy and pious person and who was the villain.