While the kaddish may be the best known piece of Jewish liturgy, particularly in its function as a prayer for the dead, there is no mention of mourners reciting it until the 12th century, and then only in texts from France and Germany. David Shyovitz, questioning previous theories of the prayer’s origin, suggests his own:
The fact that a prayer for mourners would have been newly introduced in [12th-century Ashkenaz] seems logical. After all, the year 1096 had witnessed a deeply traumatic series of massacres inflicted on the Jews of the Rhineland by armies of Crusaders headed east to the Holy Land, who thought it expedient to wipe out the enemies of Christ living within their borders before pursuing foes beyond them.
The throngs of newly grieving mourners, in this telling, required a ritual outlet, and found one in the kaddish, with its stirring proclamation of divine majesty and promise of impending redemption. . . . This explanation, . . . however, is wholly unsupported by the sources.
The custom is first attested in a copy of Maḥzor Vitri, the liturgical guide composed in the 12th century by Rabbi Simḥa of Vitri, a student of Rabbi Solomon ben Isaac (Rashi), and the overt and explicit rationale for the practice in this text is not commemoration but . . . redeem[ing] the souls of deceased relatives from suffering in hell. The martyrs of the Crusade massacres were the last people who would have been thought to require such posthumous assistance. . . .
A more compelling explanation for the rise of kaddish as a mourner’s prayer emerges from an analysis of the tale that accompanied the earliest halakhic discussions of the practice. . . [T]his story describes [the 2nd-century sage] Rabbi Akiva’s run-in with a dead man suffering in the afterlife on account of the sinful deeds he committed during his lifetime.