Self Determination Theory states, in my own super simple terms, that happiness requires three things: competence, autonomy and relatedness.
If you aren't good at all at a task, you won't like it.
If someone's breathing down your neck as you do it, you won't like it.
If you have to do it alone forever, you won't like it.
Minecraft fulfils all these needs!
Competence
In Minecraft you are supremely competent, far more than in real life. Wanna build a house? Go ahead. Wanna destroy an entire forest? Feel free. Wanna terraform an entire subcontinent? Be my guest.
In Minecraft becoming ultra-powerful is not nearly as difficult and laborious as in reality, while still being tricky enough to certainty feel worth it.
In Minecraft, nothing else can make any changes to the world but you (unless you're playing multiplayer). Some mobs may occasionally pick up a block or two, or blow up a couple if you're not careful, but the Minecraft Player is unique to the world in its sheer ability to terraform everything around it in a way no other mobs can. The feeling of competence is exhilarating.
If you leave a world, no changes occur while you're not there. So you can log onto worlds after 8 years and pick up right where you left off.
Autonomy
In Minecraft, no one can tell you what you can and cannot do.
There are very few things you cannot do in a Minecraft world, and no one to tell you otherwise.
You are autonomous in what you choose to do and create and destroy, whether you wish to kill all in your sight or create a world of leisure for the beings that share the world with you.
Just like how you can build whatever you want in a sandbox, Minecraft is a virtual sandbox, with dozens more virtual things allowing much more creativity. There's very few things that people haven't made somewhere in Minecraft, I reckon.
Relatedness
Minecraft is an extremely popular game on Youtube. This may very be a massive availability bias, but I reckon that a lot of people who don't play Minecraft multiplayer stream it on Youtube...
I think Minecraft is one of the closest things you can get to feeling like you're in the same physical space as people on other sides of the world. Minecraft is incredible for relatedness.
Minecraft fulfils all three needs of self determination theory! No wonder it's the most popular game in the world!