Minecraft is not open source. You are not allowed to distribute it in any way, in particular you are not allowed to sell it or a modified version of it. Minecraft is closed source.
There were rumours that Minecraft might become open source at some point but so far this hasn't happened.
What Minecraft however allows is for the user to modify it and to distribute the modification among other users. They seem to allow de-compilations of the java bytecode (which also works much better than de-compiling C code for example). However they (since Minecraft is closed source) do not publish the source code. Legally they could because their EULA is already restrictive but for practical reasons they don't want to do it.
The benefit is clear: more modifications made by users increases the appeal of the product and the profit they make.