Why Marius wasn't given a new home? The Copenhagen zoo has voluntarily subscribed to association standards that prohibit the sale of their animals outside of the association and manages the genetic population of their giraffes to prevent inbreeding. Allowing him to join a new herd could put the future population in danger.
Why was he cut up in front of children? His dissection represented an educational experience - which is great, not only for the biology but also because he was being prepared as food. Shielding children from frank education about where meat comes from contributes to squeamishness about using the whole animal and indifference about the conditions animals endure on factory farms.
Why was Marius fed to the lions? Because the alternative was to throw away his body and kill another animal (a cow) to take his place.
There are reasons for all of it. But when we talk about beautiful animals like giraffes, we get emotional. The reporter interviewing the head of the Copenhagen zoo is not unusual (and the interview gives a lot of back story about what happened and why):
Marius may be meat in the wild, but he was born in a zoo, and so he should have been safe so long as he was healthy - or so the argument goes. But Marius was also born in the real world, and not a fairy tale, and so things are not quite so simple.
Zoos come under attack because they exist for entertainment and profit and not solely for preservation of species. Zoos cannot make their decisions based on conservation alone or they will lose the resources that pay for it, and they are the most significant organizations who can own and preserve wild animals. A general prohibition on private ownership takes a broader incentive (and more diverse models) to breed and care for them off the table.
I'm a big fan of legalizing the ownership of wild animals. Not just as pets, but also for farming (especially in the case of Chinese medicine - rhinos can have their horns harvested without killing them, and the biggest threat to tigers is the destruction of the wild population). In addition to creating an incentive to breed them in captivity and spare wild populations, this would shift resources away from enforcing rules against ownership to those aimed at preventing cruelty and negligence.
People may not like the idea of raising (some*) animals for money, but there's no way around the fact that they will be killed for it. We can't wish away poaching and smuggling any more than we can drug use.
We might feel good about refusing to tie (some*) animals to profit, but it's at their expense, not ours. When we make emotional policy decisions about species preservation, we take important options with serious benefits off the table because we don't want to weigh them against the costs.
It is easy to say that we want to save animals. It is harder to bear the cost and actually do it.
*Dogs, cats, rabbits, pigs, cows, chickens, ducks, guinea pigs, hamsters, parrots, fish, turtles, geckos, etc. There are lots of exceptions.