And don’t forget the “free” work. There are already a good amount of pull requests on those repos from other people.
Sure, people from Mojang still need to look at the pull-requests and most things are small but I’m pretty sure that that cost is still lower than having someone from Mojang write that code him or herself instead.
Also, when people submit code like that I’m willing to bet its for something the community or at the very least the technical side of the community wants. Which means Mojang doesn’t have to make (educated) guesses for that or gather feedback.