It's not only right, it's necessary. Unless you want numerous endangered species to become extinct, zoos are nothing short of essential. Their main function is conservation. Without captive breeding, many endangered species would now be extinct - for example, the golden lion tamarin, red wolf and Przewalski's horse. I am not for a moment suggesting that we should stop trying to protect animals' natural habitats, but if endangered species were to become extinct in the wild (which sadly seems quite likely in the near future), zoos will have preserved them for future generations, with enough genetic diversity that the possibility for reintroduction to the wild exists. In my opinion it would be unforgivable to allow tigers, pandas and so on to become extinct because they were wiped out in the wild due to hunting, habitat loss, etc., and people did not want to see them in captivity. Would you like to have explain to your children or grandchildren that they will never see a tiger except in pictures, because you disagreed with zoos? I certainly wouldn't.
Zoos are also vital for education, enabling people to see beautiful wild animals that they would never otherwise get to see - seeing an animal in the flesh has a much greater impact than seeing one in a picture or on TV. - and teaching them about the threats to their species, which hopefully encourages them to respect and protect animals. The money they bring in is used to pay for the animals' food and care and to fund breeding programmes, as well as the employees' wages. Some also goes towards funding the protection of animals in the wild, and their habitats.
It's true that captive conditions in the past were often cruel, the animals being kept in cramped cages and so on, and indeed this is sometimes still the case in some countries, but in civilised countries zoos are carefully regulated - the animals are kept in conditions as close as possible to their natural habitat, with plenty of space, good diets and immediate medical care if they need it. Everything possible is done to ensure that they don't get bored - environmental enrichment is found in all good zoos. The animals will have scenery in their enclosure, things to play with if they're a playful species, and problems to solve in order to get their food, rather than it just being dropped in front of them.
It's also important to remember that animals are not taken from the wild and 'locked up in cages'. Animals in zoos are captive-bred - they were born in captivity, as were their parents, grandparents, great-grandparents and so on. They have known nothing else, and have no idea such a thing as the wild exists, so there is no way they can miss it. They are certainly not unhappy - if they were, zoos would not achieve the breeding success they do (unhappy or unhealthy animals do not breed).
It is overly anthropomorphic to say things like 'they will never know freedom'. Freedom is a human concept - of course a human kept in one place would be miserable, but we have knowledge of the wider world outside. Animals don't - they have no knowledge of abstract concepts or things outside their own experience. They have no idea what freedom is, or that there is any other life than the one they lead. A lion in a zoo doesn't sit there thinking: "I could be in Africa hunting a wildebeest right now." It doesn't know what Africa is, or what wildebeest are. As long as an animal has a comfortable place to live, plenty of food, and the right company if it's a social species, it is content. One might even argue that they are better off in captivity, since they do not have to contend with the constant dangers of the wild - disease, injury, predation, starvation, etc. - and live much longer as a result.
EDIT: love.cat, I'm sorry, but you are talking utter nonsense. You have clearly got your information from anti-zoo websites that are obviously biased against the keeping of animals in captivity - such sites, especially extremist ones like PETA, often present false information to sway people to their side of the argument, or use that which is only applicable to badly-run third world zoos. Don't just believe what they tell you!
I used to be a zookeeper (in the UK), and have also studied various animals in the wild. I can assure you that I am very much informed on these matters - I have been there, seen it and done it myself. I have seen literally hundreds of endangered animals born in zoos (the "majority" of them are certainly NOT wild-caught), and many released successfully into the wild. As for your comments about breeding - yes, it is instinct to breed when the female comes into season, but in most cases if she is stressed or unhappy she won't go into season, and even if she does, she won't conceive.
I've also seen an 8-year-old male lion in the wild die a slow, painful death from infected wounds after being driven from his pride by new males, and a male lion of 25 romping around with his females and cubs in a zoo. Do you really think the wild one was the happier of the two?
Studying captive animals has produced literally mountains of information, which is often used to help protect the species in the wild, and I can assure you seeing an animal in a zoo can have a huge impact on people. If you'd ever seen a small child gaping with wonder at his or her first sight of a lion or an elephant, you would know what I'm talking about. Seeing animals in zoos has inspired many people to research and protect them in the wild.
And are you really saying that you would prefer animals like tigers and giant pandas to disappear forever than to see them in zoos? Because that is the future we may well be faced with - these animals are teetering on the brink of extinction in the wild.