Because it was not JS, it was UnityScript which is what happens when someone read "JavaScript: The Good Parts", and thought the title was "... The Bad Parts" and threw all those away and kept only the actual bad parts.
It was just about fine if you were doing very small projects but quickly got very hairy, and their compiler was full of bugs.