And yet it still raises questions. It happened very suddenly as these things go (over a few years or decades, rather than centuries), and seems to have been accompanied by a deep, long-lasting cultural shift. Even after Japanese isolation ended in the mid 19th century, there didn't seem to be any real reversion (hence, indirectly, the originally linked article). If the establishment of the Tokugawa Shogunate was enough to make Japan give up the gun, why was it's collapse not enough to make Japan re-embrace it? If the answer is "unique Japanese culture", why was it not present at the start of the Sengoku period? It's not like the Sengoku period was just way more violent than the 1850-1950 period.
Anyhow, the book I linked (which I last read over 10 years ago, so I'm a bit fuzzy on some of the details) goes into a lot more detail, digging through historical records and evaluating most of the obvious theories. I highly recommend it!
> The Sengoku period (戦国時代 Sengoku Jidai, "Age of Warring States"; c. 1467 – c. 1603) is a period in Japanese history marked by social upheaval, political intrigue and near-constant military conflict. Japanese historians named it after the otherwise unrelated Warring States period in China. It was initiated by the Ōnin War, which collapsed the Japanese feudal system under the Ashikaga shogunate, and came to an end when the system was re-established under the Tokugawa shogunate by Tokugawa Ieyasu.
So, after the period of war ended and the Tokugawa Shogunate was established, the "Bakufu" clearly did not want millions of unemployed soldiers hanging around with guns. (I heard even the invasion on Korea was conceived as a means of keeping soldiers and lesser feudal lords busy, though I'm not sure how widely it is believed.)