It's not purely a C++ vs. Java thing.
Minecraft was simply never intended to be this big of a game. It was initially designed to be really just a game where you place blocks on other blocks. The Survival-mode, fighting against monsters etc., that was all gradually glued onto an architecture which wasn't intended for it.
One example that I happen to know, is that they never intended to have all these effects like smoke, water drops, the swirls from drinking a potion. All of this was pretty much just a hack for the longest time with no real place for it in the architecture. Eventually they fixed that and added it to the architecture, and could improve effects-performance massively with that, but there's probably still loads of things like that in the game.
Another big part of this is that Minecraft generates and loads its map in 2-dimensional chunks, or pillars if you will. So, when you move through the world, it always has to load in and keep loaded the entire height of the map, no matter if you're scraping along the clouds or if you're deep underground. If you're traveling into new terrain, it has to generate the entire height all at once, as well.
Minetest instead uses 3-dimensional chunks, i.e. cubes, and can just load/generate those freely how it needs them. So, if you're standing on a mountain and look down, it loads all visible chunks, but can just leave out those which are underground. Or if you're underground yourself, it can leave out really pretty much just all chunks altogether, except for the few which are directly around you.
This also has the effect that Minetest-maps can be unlimited in height, whereas Minecraft-maps need to be limited (currently 256 blocks; it started out at 128 blocks), as otherwise Minecraft would really just need infinite RAM and never get done with generating the map.