The Daimyo had to spend one out of every two years in Edo. This procedure was called "Sankin-koutai" in Japanese. "Sankin" is that the Daimyo goes to the Shogun to greet. "Koutai" is that the Daimyo returns to his territory. The Daimyo showed his loyalty to the Shogun by this greeting.

This figure shows the schedule and the cost when the Daimyo in Tottori came to Edo. The trip to Edo took 22 days. The distance was about 700km(435 mi). About 500 retainers traveled with a Daimyo. The required expense was 1,957 ryou (about 1.6 million USD) one way. Ryou was the currency used in the Edo era.
The government did not require that much money should be used on this procession. However, the Daimyo used much money, in order to show off his authority.