God renames Sarai "Sarah" [Genesis 17:15], removing a yod at the end and replacing it with a heh. Later, the name of Hoshea. Moses' successor, is changed to Joshua, adding a yod. [Numbers 13:16]
The Midrash says:
Rabbi Shim'on Bar Yochai said: The yod that God took from Sarai flew and posted itself in front of the Throne of the Holy One, and said: Master of the Universe! Because I am the smallest letter You took me out of the name of Sarai the Righteous!! [Bereshit Rabbah 47:1]
The Talmud says:
[King] David pleaded before God: "Sovereign of the Universe! Who can understand his own errors? [I know I have many sins.]" God said: "They are forgiven you." ... David implored: "May my sin [the incident of Bathsheba] not be recorded in the Torah." God said: "That is impossible. If the single letter yod I removed from Sarai continuously protested for many years until Joshua came and I added it to his name... how much more so a complete section in Bible!" [Sanhedrin 107a]
My question is: What teachings should we infer from these colorful allegorical stories? Is this discussed anywhere? Here is what comes to my mind:
(1) Nothing is wasted in the world. Everything is recycled, even a letter. Chazal tells us often that some latter-day biblical characters were the same as earlier ones (Keturah was Hagar, Melchizedek was Shem, Job's wife was Dinah, etc.)
(2) All significant events must be recorded for posterity. Full transparency, warts and all. People must be shown as they are.
(3) Everything is connected to everything else (Sarah, Joshua, David...), attesting to the fact that God is One.