The myth of ninjas wearing black may come from Japanese Bunraku and Kabuki theater.
.
In those performances, the puppeteers and stage hands would wear shapeless all black outfits in order to hide in the background, in an often successful attempt to remain unseen by the audience. However, in some dramatic tales, one of the black clad stage hands would leap from the shadows to murder one (or more) of the charecters like an assasin.
.
Depending on the tale, it was not just a dramatic advancement of the plot, it was also ment as a metaphor in the portrayed situation that danger, enemies and opponents are often all around us. Unseen, hidden in plain sight.
.
In those performances, the puppeteers and stage hands would wear shapeless all black outfits in order to hide in the background, in an often successful attempt to remain unseen by the audience. However, in some dramatic tales, one of the black clad stage hands would leap from the shadows to murder one (or more) of the charecters like an assasin.
.
Depending on the tale, it was not just a dramatic advancement of the plot, it was also ment as a metaphor in the portrayed situation that danger, enemies and opponents are often all around us. Unseen, hidden in plain sight.