Saying "Minecraft was rewritten" is a little misleading. The Pocket Edition was ported to Windows 10. It wasn't rewritten. Also, the main edition that one can purchase for Mac, Windows, or Linux is still in Java. The Pocket Edition, which was built long before Microsoft's acquisition, was not written in Java.
The pocket edition was already pretty far along before the Microsoft aquisition. It seems they invested in improving that rather than the original codebase.