Microsoft didn't rewrite Minecraft in C++. It was rewritten in C++ by 4J Studios that were contracted to do so by Mojang in order to bring Minecraft to the consoles. Microsoft did create the Windows 10 edition and likely reused a lot of the code developed by 4J Studios.
Faire enough, but the reasoning was still lack of Java compiler support and Microsoft's decision to keep one codebase instead of two parallel ones.