Why are they even maintaining two versions of the same game?
As far as I remember the original plan was to only maintain both in a transitional phase, with the aim of fully replacing the Java edition. A simple plan: bring Bedrock to feature parity with Java, add a modding API that satisfies 95% of use cases, then force everyone onto Bedrock. The feature parity is mostly there, but modding in Bedrock seems to have become a non-goal, and Bedrock has so many bugs that if your platform offers the choice between both Java is still preferred even if you don't care about modding.
Because they aren't the same, Bedrock is more limited in modding capabilities, and the Java community doesn't care about it.
Microsoft logically wants to keep sales from both.
Discontinuing Java would make a lot of players stop playing (including me).
Java is for the modding user-base. If they would kill that, there is a good chance that the whole Youtube/Twitch creator ecosystem around the game dies, and with that it's popularity.
Bedrock is more performant and more portable across platforms (e.g. on consoles where you couldn't mod anyways).