There are several interesting episodes about the origin of Rath Yatra stated in Vedic scriptures.
(1) In the Vedic scripture 'Srimad Bhagavatam', it is said that devotees celebrated this day when Shri Krishna and Balram left Gokul for Mathura in a chariot. This was known as Rath Yatra.
(2) After Lord Krishna delivered the evil Kansa, he gave darshan to devotees in a rath with Balram, in Mathura.
(3) When Lord Krishna was in Dwarka, on the west coast of Saurashtra, he once took his sister, Subhadra for a ride in a chariot to show her the city’s beauty. Devotees celebrated this day as Rath Yatra.
(4) After he left his material body, his bones floated to the shore of Jagannath Puri, on the east coast of India. Here, the Lord gave darshan to King Indradyumna and instructed him to collect the bones, place them at the back of wooden dieties and build a temple.
Since then, during Rath Yatra, the dieties of Lord Jagannath, Balram and Subhadra are placed on separate chariots and pulled by millions of devotees.