Yom Kippur likely started as a Babylonian pagan day of atonement which was later adopted and modified by Jews returing from the Babylonian exile. Here's why.
Above: a haredi man performing the kapparot (atonement) ritual with a live chicken just before the start of Yom Kippur
Did King David Fast On Yom Kippur? Likely Not, Because Yom Kippur Likely Did Not Exist Until Second Temple Times
Shmarya Rosenberg • FailedMessiah.com
It is very likely that Yom Kippur did not exist at all during the First Temple period.
Here is some of the evidence for that summarized from an article in Ha’aretz:
• Writing just after the First Temple was destroyed by the Babylonians, the biblical prophet Ezekiel seems to be completely unaware of Yom Kippur and it is not on his list of holidays to be observed when the Temple is rebuilt.
• The biblical prophet Zecharia does not seem to know about Yom Kippur. When he instructed the Jews returning from Babylonian captivity on observation of fast days, he does not mention Yom Kippur.
• When the biblical figure Ezra the Scribe reads the Torah to Jews who returned from Babylon, he told them they need to prepare for Sukkot, but Yom Kippur is not mentioned. That Torah reading took place on the 1st of Tishrei (what we today call Rosh Hashana). Yom Kippur falls on the 10th of Tishrei and Sukkot falls after that on the 15th. Yet Ezra only mentions Sukkot but does not mention Yom Kippur at all.
• There are three biblical mentions of a Day of Atonement: Numbers 29:7-11, Leviticus 16:1-34, and Leviticus 23:26-32. Many academic scholars now believe these mentions were added by priests to the biblical text during the Second Temple period as a method of validating new religious rite they had instituted to purify the Temple in preparation for Sukkot, which was then the most important holiday (or the second most, after Passover).
Israelites did not know about sitting in sukkahs until late in the First Temple era when priests claimed to have found a “forgotten” Torah in the Temple. This incident is recounted in Tanakh (the Hebrew bible), and it is likely a reasonable guideline for how Yom Kippur was later created by priests and added to the calendar.
• There is an ancient 12-day Babylonian new year festival, Akitu, which predates Yom Kippur and has striking similarities to it.
• The fifth day of that festival involved a purification ceremony called kuppuru, which involved dragging a dead ram through the temple, supposedly purifying it of impurities.
• Kuppuru and its Hebrew cognate kippur meant “to uncover” or “to remove impurity.”
• On the fifth day of Akitu, the king entered the sanctuary of the god Marduk, accompanied by the high priest. Facing the statue of Marduk, the king would intone: "I have not sinned, Oh Lord of the universe, and I have not neglected your heavenly might." (Middle Eastern peoples in that era viewed their kings both as human reflections of the divine and as the representative of their entire nation. Acts done by a king both impacted the behavior of the particular god of his nation and reflected on the entire population of the nation.) This was the only day the king entered the sanctuary each year.
• Yom Kippur is the only day the high priest enters the Holy of Holies in the Jerusalem temple, and he used that opportunity to confess the sins of the Israelites. “And Aaron shall lay both his hands upon the head of the live goat, and confess over him all the iniquities of the children of Israel, and all their transgressions, even all their sins; and he shall put them upon the head of the goat, and shall send him away by the hand of an appointed man into the wilderness.” (Leviticus 16:21)
• Academic scholars note that in ancient times, writers commonly claimed their work had actually be written by a long deceased patriarch. The Temple priests, saw Aaron as their patriarch and as the first priest, and often attributed their writings and legal rulings to him – even though he had (if he ever actually lived) been dead for hundreds of years.
• The practice of transferring the disfavor of a deity from humans to an animal which is then banished from the community or slaughtered (what we now call a "scapegoat”) was a common practice in the ancient Middle East. The earliest known reference to the practice was found in Ebla in what is today a part of Syria. In the 4,400-year-old to 4,300-year-old found there
were two descriptions of a scapegoat ceremony. One reads: “We purge the mausoleum. Before the entry of Kura and Barama, a goat, a silver bracelet [hanging from the]goat’s neck, towards the steppe of Alini we let her go” – in other words, a ceremony that was almost identical to the Israelites’ much later Azazel (scapegoat) ceremony mentioned above.