How did the festival of Bhai Dooj begin?

The festival of Bhai Dooj is celebrated three days after the Diwali.
This year Bhai Dooj is on 15th November.
On Bhai Dooj, there is a religious belief of eating food after applying Tilak to the brother.
On this day, sisters apply tilak to their brothers.
It is believed that if a brother goes to his sister's house and eats food, he is saved from untimely death.
According to Hindu mythology, Lord Krishna went to meet his sister Subhadra after defeating the demon Narakasura, since then this day is celebrated as Bhai Dooj.
On this day, by applying tilak on the forehead of the brother and honoring him like Subhadra, the love between brother and sister increases.
According to Hindu mythology, Bhai Dooj is also dedicated to Yamraj, the god of death, and his sister river Yamuna.
Yamraj forgives you if you sincerely ask for forgiveness for your sins.