Zen has been around in Japan for a long, long time (about 1500 years, including it's Chan ancestry). But it was the samurai class centuries later that popularized it as a philosophy for warrior classes to follow (sword and other). I think it was something the average warrior would come across as part of religious study. And Musashi is the best example. And of course the Kamikaze are a great counterexample of how Zen was later on employed for suicide attacks.
Consider that Musashi studied Buddhism most of his life, but only began training zazen in his 30's, after he was already a notable duelist. And it wouldn't be until nearly his years later that he'd write the notes and texts that we associate with Japanese sword Zen.
But in the Chan tradition, weapon work and Chan go hand in hand. Many old Chinese weapons, and a lot of terms used in teaching them, are covered in Chan Buddhist symbolism.