Java was coded in Javascript, consoles and mobile devices don't support that coding language. For Mojang to be able to put Minecraft on consoles and mobile they had to make a new version coded in C++.
Also Java servers would turn consoles, phones, and tablets into bombs