Quick answer. Kyoto was the home of the emperor and the royal court for most Japan's history. Tokyo did not gain much prominence until the early shogunate's took control of most of Japan leaving the emperor in power but having no control over Japan. The Tokugawa reign lead most nobles to move to Tokyo and reside in both locations to remain in power. The shogunate's power was in military rule while the emperor was still seen as manifestation of the gods.