It's just coincidental, one fad inspired another's name. Kind of like C++ and C#. Syntactically JS is kind of similar to Java, isn't a big leap to move from one to the other.