It’s by no means a simple issue. Zoos must be allowed to manage the genetics of their populations, so dealing with the genetic makeup of their herd is not in itself unethical. However, allowing the genetically related parents to breed in the first place is problematic, although the circumstances around animal have not been released. We would also have expected castration and/or rehousing to be a viable alternative, but once again it is difficult to form a concrete position without understanding the details. Performing natural behaviour as much as possible (sexual behaviour being part of it) in order to keep a population healthy is part of the credo of zoos. Castration is sometimes a risky thing to do, sedation in giraffes is especially risky. In order to have viable populations of species in zoos it is necessary that the needed space is provided and not occupied by other specimens or species of no or little conservation value. Therefore euthanasia can be used as part of population management.
Public autopsies could obliquely be seen as ethical, from the standpoint that an animal that passes away could be put to as much use as possible. If the animal eventually went to a museum to be mounted (as often happens) that would be better still. In the case of this individual, and the public outcry against putting them down, it seems an unfortunate decision from the perspective of public engagement. The educational value of such dissections are dependent on the cultural background. While biologists might see this as a normal procedure as in many countries, in other countries it might be seen completely opposite. Therefore a sensitive approach has always to be looked for.
The World Association of Zoos and Aquariums has also published a statement. See it by clicking here.