You have missed the point, if need to breed them but need more females how do you do that? What you do with males that are not required?
As a zoo, generally, they need to manage their populations better in the first place, they do not even attempt to do this. There is also the option of moving specific animals which maybe prone to producing male calves?
They are several ways to control breeding, but if they do want to breed, to produce certain genders, then they have to take their chance, and risk producing males? Obviously you cannot guarantee which sex is produced.
Surplus males have always been euthanased of course, but not in such a public way. Sometimes euthanasia is the only option left, but bodies such as EAZA, who were less than helpful in the Marius situation, need to review their policies to help zoos in that difficult situation rather more than they do currently.
Another issue I have is what exactly is so educational about the public dissection of such an animal for children to witness anyway?