My PC can run The Witcher 3 with everything on max, but not Minecraft? Why?

I5-3570
GTX 1050
8gb ram

Why minecraft has 20 fps?
Is it heavier than the witcher 3?

Minecraft is pretty CPU dependant, you're running a 3rd generation i5 - it's a slouch when it comes to big workloads (like rendering procedurally generated blocks). If you drop your render distance down it should be better.

Witcher, by comparison, uses the GPU mainly so it's less affected by the CPU powering it.

Recently I've seen a few Witcher 3 benchmarks and that game isn't very hard on the CPU.

Minecraft should still run on the i5, but if you have mods and cheats on Minecraft then it won't run all that well. Minecraft is CPU dependent.

The problem is either background tasks or drivers need to be updated.