The story of the Temple of Jagannath is quite interesting. Here’s how it goes:
Centuries ago, there lived a king by the name of Indradyumna in Malwa in central India. He was a great devotee of Lord Vishnu. He wished with all his heart to see the Lord Vishnu is his truest and most perfect form on the face of the Earth. He prayed and meditated with this primary wish in hopes that it be fulfilled.
Eventually, he had a dream that was interpreted to be a divine communication of the Lord Vishnu. The dream stated that the most perfect form of Lord Vishnu could be found in Utkala, the old name of modern day Orrisa. In great happiness, he deployed the younger brother of his royal priest, Vidyapati to go to Utkala and figure out the spot where Vishnu manifests in his true form and report back to him.
Now, the Lord Jagannatha was worshipped in a dense forest Orissa in secret as Nila Madhava by an aboriginal chief. The place was such a well-kept secret that almost no one else knew about its existence.
Accordingly, Vidyapati visited Odisha and after laborious search, he learned that Vishnu was being worshipped in the name of Nila Madhava somewhere on a hill in a dense forest. He also learned that that Nila Madhava was the family-deity of Visvavasu, a Savara (an aboriginal tribe) chief. But so great was the secrecy that Visvavasu refused on request to show Vidyapati the place of his worship
Vidyapati did not give up but eventually married Lalita the daughter of the only person who knew the location of worship. After a long, at the behest of his daughter, Visvavasu took his son-in-law blindfolded to a cave on a hillock where Nila Madhava was being worshipped.
The smart Brahmin managed to drop mustard seeds on the ground and traced them after the seeds germinated a few days later.
Elated, he returned and described his experiences to the king who set out to witness the same. But upon arrival found that the site had miraculously disappeared.
Dejected and forlorn, he received a divine message to go to the sea-shore at Puri and draw ashore a log of wood that would be floating on the waves. It was from this divine log, the body of Jagannatha, who is no other than Visnu himself, was to be fabricated in a befitting manner. But there was none to be entrusted with the work, since nobody could say that he had seen Vishnu.
At last, the Lord Vishnu taking pity on his great devotee appeared before him as an old carpenter and evoked confidence in the king about his capabilities.
As per his suggestion, he was to be allowed to remain in a closed room with the log of wood for long twenty one days to do the needful and under no circumstances should he be disturbed or the door be opened before the specified date.
However, on the fifteen day, the Queen being very Kind-hearted persuaded the king to open the door to check up on the well-being of the carpenter. When the door was opened no trace of the carpenter could be found and all that could be seen was a set of four wooden images in incomplete form, i.e., the form in which we see and worship the images of Jagannatha, Balabhadra, Subhadra and Sudarsana at present.
Thus, goes the story of the incomplete deities which are worshipped.