Prior to 1885, train lines connected Ueno (via Akabane) to Aomori in the north and Shinagawa to the port city of Yokohama (Japan’s first train line), but there was no train line connecting Shinagawa to this northern line. To resolve this tracks were laid in 1885 connecting Shinagawa to Akabane in the north of Tokyo. It was therefore constructed not as the passenger line it is today, but as a freight train to help carry materials to the northern prefectures of Japan. And because this train line looped in a large ‘C’ shape around the yama-no-te (“foothills”) of Tokyo (where there were fewer people living), the new rail track took the name that we know today.
As Tokyo’s population grew over the years and the Yamanote Line was the natural line to connect the growing hubs, it was expanded to Ueno in 1903 and then connected with other lines such that by 1925 with tracks laid between Ueno and Kanda it formed the oval circle that today is used by over 4 million people. At the time it took 1 hour and 12 minutes to make a complete loop. Today that time has been cut down to… 59 minutes! A testimony to the efficiency of the Japanese rail system.
Incidentally, the zero-meter market can still be seen from the platform 1 at Shinagawa Station.