Once Lord Vishnu along with Lakshmi Devi came to the bhumandala to visit the mrityuloka. Lord asked Lakshmi Devi to stay back while he proceeded in the southern direction. Bored, Lakshmi Devi started wandering and found a sugar cane field. She broke a piece of sugar cane and started chewing it.
By this time, Lord Vishnu returned and was annoyed at the mischief of Lakshmi Devi. He cursed her saying that she would spend the next thirteen years serving at the field of the farmer. With Lakshmi Devi at his service ( which he didn't realize), the farmer got all the riches in the world.
Twelve years went by and Lord Vishnu came back in disguise to get Lakshmi Devi, but the farmer refused to give away his best maid.
The lord gave the farmer a conch shell and asked him to go take a dip at Ganga along with his family after offering the conch shell to the holy river. While doing this Ganga devi appeared before him and informed that the couple back home were none other than Lord Vishnu and Lakshmi Devi. He was also told that if Lakshmi Devi goes back he will lose all his wealth.
The farmer came back and prayed that the goddess stay with him forever. Lord Vishnu told him about the curse and it was not possible for Devi to stay anymore with him.
Then Devi told him that if he wanted to stay rich, he should worship her during the night of Trayodashi every year by lighting a lamp of ghee. She would be present wherever such worship is done and bless with prosperity and abundance.