Barbaro ultimately foundered, it wasn't exactly the broken leg itself that killed him, but the other issues that arose. And like Kelly G said, he had the absolute best veterinary care that an animal could have. Most racing owners would have euthanized the animal right away. He only lived because he had a value as a stud. But any damage to a horse's legs is a death sentence usually, excellent care or not. They aren't the same as a dog or cat.
Another good point was brought up. Pneumonia. Humans in the hospital have this problem too. If you are being kept immobile, you aren't breathing as deeply usually, and it will lead to pneumonia. You can't make a horse do deep breathing exercises, so that is a huge issue with keeping them still.
You know, if they were so desperate, they could have treated the laminitis in his legs. But it would have been cruel for Barbaro. No amount of opiates could have made him comfortable since it is a horribly painful condition for the horse. Obviously his owners agreed that his suffering along wasn't really living.