Why Are Pranks Made On The Innocents Holy Day?
How do we go from the commemoration of a massacre to a day when we play jokes?
The Gospel of Matthew is the only one of the four in the Bible that keeps the record of the slaughter of the Innocents. In it, the evangelist recounts that Herod gave the order to kill the children born in Bethlehem and those under two years of age after he was deceived by the wise men of the East who had promised to provide him with the exact place of Jesus' birth.
Matthew claims that this act fulfills one of Jeremiah's prophecies:
Then Herod, seeing that he had been outwitted by the wise men, was terribly enraged and sent to kill all the children of Bethlehem and all his region, from two years old and under, according to the time that the magi had specified. Then the oracle of the prophet Jeremiah was fulfilled: "A cry has been heard in Ramah, much crying and lamentation: it is Rachel who cries for her children, and she does not want to console herself, because they no longer exist"
The slaughter is appalling and is a reflection of what a man can do to perpetuate himself in power. Although its historicity is questioned.
A Tragic Tale With Very Few Sources
In the Bible, only Matthew remembers this massacre. In fact, it is not recorded in any other manuscript from the first centuries of the Common Era.
Although there is evidence in one of the so-called apocryphal gospels. These texts date from the first centuries of Christianity and were not accepted into the canon of the Hebrew-Aramaic Jewish Tanakh of the Greek Septuagint Israelite Bible (Bible used by early Christianity), nor of any of the versions of the Bible used so widely by Catholics as well as Orthodox, Anglicans, and Protestants.
In one of those texts, the Armenian Infancy Gospel to be exact (the author is unknown), the order was given by Herod I the Great is recounted. The text is late, it cannot be earlier than the 6th century (half a millennium after the events took place).
Josephus had no empathy with Herod, in the texts he narrates the brutal character of this king and describes him as a being pathologically clinging to power, so much so that, according to him, he was capable of murdering his relatives just because he suspected that they wanted to supplant it. Josephus uses all the elements at his disposal to describe the wickedness of the king and it is very strange that such a massacre is not mentioned by him.

A Symbolic Reading
Matthew would then resort to an ancient historical tradition that tries to establish the fate of the great characters through symbolic stories about their origin, even about their death, as is the case of the stories of Diogenes Laertius about the life of the great philosophers.
Thus, Jesus would have an analogous origin that would fill him with symbolism.
And Where Does The Festive Character Come From?
It was the Church that made Christmas coincide with these dates (they lasted more or less between December 17 and January 2), hoping to put an end to pagan customs.

And The Jokes?
This alteration, in which a commoner became ruler, influenced medieval festivals and carnivals. In medieval Spain, said king was known as The King of the Innocents (which was the king of the world upside down).
In Spain and Latin America, it is very common that this day is used to play jokes. In some countries, it is even important not to lend any good, since if it is, the beneficiary may not return it.