Note the wakizashi, the short sword used for close in fighting, and the katana, the long sword used for slashing.
Japan began its emergence from a feudal system into the modern world in 1853 when Commodore Perry had sailed into Japan. Until that time, except for a small Portuguese colony for trade, Japan had lived in isolation from the world.
Seeing Perry’s powerful gunboats was a great shokuku (shock ) to the Japanese. They realized they could easily be overrun by other nations if they didn’t modernize. The shogun was overthrown and Emperor Meiji was restored to the throne.
That modernization caused great turmoil in Japan. The samurai became unnecessary. Carrying swords was eventually banned which was a great blow to the samurai. You will read in The Pac Conspiracy how significant the sword was and still is to the psyche of the samurai.