You can still play each version separately.
Minecraft: Java and Bedrock Edition

The tale of the two separate versions of Minecraft on PC is an odd one. A while back, if you had purchased the Java version of Minecraft prior to October 19, 2018, you were able to claim a free copy of the non-Java built Bedrock Edition for free. All you had to do was tie your existing Mojang account to your Microsoft account.

If you didn't own the game prior to that 2018 cutoff date, you could still get Minecraft, but you apparently had to purchase both Java and Bedrock separately. I believe that's how the whole process went down. I honestly don't know because I've been grandfathered into having both versions for years now and can't keep up with all things Minecraft.

Whatever the case is, it's all about to change again. Starting on June 7, Minecraft: Java & Bedrock Edition for PC will be released. This effectively combines both versions into a single purchase for everyone. Both versions can still be launched separately from a unified launcher, so you can play with your friends on whichever version is preferred.

As its name suggests, this package gives you both editions in one purchase, and it will become the standard and only offering of vanilla Minecraft on Windows PC. Of course, you will be able to cross-play with either Java or Bedrock players by launching whichever edition your friends are playing – but not at the same time, mind you. We tried that and now part of our office is in a time warp.
If you already own one or both versions, you do not have to purchase this. Starting on June 7, you will get whichever version you don't currently own for free. You apparently do not need to do anything to claim this, but it make take upwards of 3 days for the game to show up once it starts to roll out to everyone that is eligible.

Also, if it wasn't already clear here, this only applies to the PC versions of Minecraft. That means Windows, Mac, and Linux will have this option available to them starting on the 7th.