According to the legend, there lived a king named Indradyumna in the Satyuga. He was an ardent devotee of Lord Vishnu and wanted to build a temple for him. However, he did not know how to how to design the idols. Therefore, he meditated to seek Brahma's advice.
Lord Brahma appeared and suggested he must seek the blessings of Lord Vishnu himself and find out the answer. Therefore, when the king invoked Lord Vishnu, the latter appeared in his dream and asked him to visit Bankamuhana to find a log of neem wood. Thus, he got a hint about the material he would have to use for making the idols.
Soon, the king rushed to the spot to find the log mentioned by Vishnu in his dream. However, he wondered who would craft idols out of it. Indradyumna appointed several sculptors, but none could succeed in cutting the wood as their instruments broke. Worried that he wouldn't be able to build the temple, as the king sat disappointed, Lord Vishwakarma, the architect of Gods appeared before him in the disguise of an artist named Ananta Maharana.
Though he volunteered to make the sculptures, he put one condition. He said none should see him or open the doors of the workshop until he gives his consent. Days, months and years passed. The king was eager and curious to check the developments. And when the king opened the doors, he could only find the three unfinished idols of Jagannath, Balbhadra and Subhadra. He wondered why the limbs of the deities were left incomplete. And surprisingly, the craftsman had also disappeared.