Minecraft started on Java, a massive mod and server community created around it. Consoles won't run JIT/JVM/Java, so the Bedrock C++ version was created. People don't want to give up the massive mod community, so OG pc players stay on Java, while console players and newer PC players go to bedrock (with some of those PC players jumping over to Java after servers or mods are discovered).
They almost have feature parity, but there are some small differences around the edges. There exists modded server options for enabling bedrock and java users to connect to the same server.