In the late 19th century the new Japanese government chose European models for economic and political systems; it also chose European music as its official standard.
European musicians were brought to Japan, and in 1879 Franz Eckert (above) arrived in response to Japan’s request to the German navy for a kapellmeister. As a conductor for the Japanese navy and teacher at military and civilian music schools, he was among the most influential European musicians in Japan in the 1800s.
Eckert is widely considered the composer of Japan’s national anthem, Kimi ga yo, though he maintained that he merely arranged an old Japanese melody.
This according to “German military musicians in Japan during the early Meiji Era (since 1868)” by Wolfgang Suppan and Wilhelm Baethge (Journal of the World Association for Symphonic Bands and Ensembles III  pp. 13-32). Below, Kimi ga yo as it was sung by Koyanagi Yuki and the audience when Japan played Trinidad and Tobago in 2006.
Related article: The Sultan’s bagpipes