The story with Java vs Bedrock edition is far more complicated. Microsoft, even with all of their resources, is in a bit of a pickle with this one.
First off, while the two games are roughly 95% the same, they are entirely different codebases (Java & C++), with their own bugs, quirks, incompatible formats, protocols, a couple unique mechanics, etc.
Java Edition (the OG Minecraft) has too huge of a following; it was heavily reverse-engineered early on, with a couple independent efforts (Fabric, Forge) creating modding bridges that enabled a thriving community of mod makers, that many servers heavily rely on. Even if you only consider the creator communities on YouTube (like Hermitcraft, Empires SMP, SciCraft) - some creators from these communities have millions of subscribers. You can't neglect Java edition because you will alienate an enormous part of your community and basically kill the brand. In fact Mojang's strategy is usually to release new features in JE development snapshots, and trickle them to Bedrock Edition once a stable JE release is cut.
But JE is also some of the most poorly-optimised software in existence, even after you install third-party mods (Sodium, Iris) that fix a lot of the performance issues. To even have a remote chance at supporting all the underpowered platforms, Bedrock Edition (formerly Pocket Edition) had to be created. Mojang/Microsoft is in one hell of a pickle, maintaining two parallel implementations of their core product, bending over their backs to maintain feature parity, with no real hope for cross-play ever.
Now why is there no Bedrock for Mac & Linux, is indeed a very good question. Perhaps it has less to do with being evil and more to do with the fact that these are likely already niche, as a total slice of JE installations, and Microsoft doesn't see a market there. Personally I am not bothered, as I prefer Java Edition anyway, but I understand why someone could get upset over it.
Funny thing is, thanks to Minecraft JE being Java, it works quite well even on completely unsupported platforms. The community built custom cross-platform launchers, figured out pretty quickly how to run the game natively on M1 Macs, heck it runs perfectly fine under *BSDs as well.