This is how the Festival of Rakhi Began the Tradition.It is believed that the Demon king Bali did "Yagya" for expanding his Kingdom. During the puja ceremony Lord Vishnu came as a little beggar and asked him just 3 steps measured land for "Sandhya Vandan". As Bali was a great donor he agreed to do so. His religious teacher Shukracharya stopped him to do so, but ignoring his alert he picked the pot and took water on his palm for "Sankalp"(religious promise).
Soon lord Vishnu appeared in its vast board form and in just two foot step measured his entire kingdom. The demon king becomes very sorry to see his promises are going to be false. As he has no land left where the lord Vishnu will put his third and final foot the king offered his back. Depriving all his kingdom lord sent him to "Patallok"
Vishnu became very happy to see such a great donor. In return the Vishnu asked him to beg a boom. The king asked him to be the gate keeper of his kingdom in "Patallok".
There in "Golok" Lakshmi was waiting Lord for a long time. She asked Narad to find the exact location of Lord. Narad singing Narayan Narayan moved from one "Lok to another Lok" finally reached Patal. There he saw Lord Vishnu working as gate keeper. He returned and planned an idea. He told Maa lakshmi to go to king Bali and tie a thread on his wrist as Rakhi. He is famous as a kind hearted donor. He will definitely say you to ask something in return. Then you must beg lord Vishnu