The most important change that occurred to the shakuhachi after the instrument was imported into Japan from China was not the change of bamboo, but rather the reduction of finger holes from six to five, and to a lesser degree, the enlargement of these holes. The reduction was primarily due, so the theory goes, to the growing desire of the Japanese of the time to play music in Japanese modes rather than Chinese ones. The sixth hole was not necessary in playing Japanese music. The enlargement of the holes better allowed for manipulation of pitch which further allowed for playing Japanese modes.
One can easily guess why madake was chosen as the bamboo of choice, replacing the thinner Chinese bamboo used to make the xiao. Madake is the second most common bamboo in Japan, just after the even larger moso. When making bamboo flutes, the first rule is to use bamboo that is available to you! A side effect of using madake is that the bore, compared with the xiao, became larger. This meant that the blowing hole was larger. This, in turn, allowed for the development of the meri/kari technique of pitch manipulation, again conducive to playing Japanese modes.
There was another Japanese bamboo flute descended from the Chinese one, called the hitoyogiri. It had small holes (though also 5 of them), and sometimes used thinner bamboo. It was almost impossible to meri/kari and to partially open and close finger holes with this flute. It is no surprise that it was delegated to the museum of nearly forgotten musical instruments by the end of the 19th century.
The theory behind the use of the roots in the construction of the bamboo is that the instrument made a better weapon when made with the heavier, ‘spiky’ root end. The wandering komuso (‘priests of nothingness’), all former samurai versed to various degrees in martial arts, and perhaps some of their lower status predecessors, the komoso (‘straw mat priests) were not adverse to using weapons to protect themselves while on pilgrimages.
Contrary to what many people think, the Edo period komuso were allowed to wear and use swords. So the root end shakuhachi didn’t necessarily replace their swords, but it appears that it may have contributed to their defences.