However kindly animals are treated and looked after in the zoo, they are deprived of their freedom and natural environment. How can we justify this from the Islamic point of view?

Why should we justify this from the Islamic point of view? Does Islam order or recommend the maintenance of a zoo anywhere in Islamic society? May I say that if a Muslim society does not maintain a zoo, it does not overlook any rule of Islam. So, if a society keeps a zoo, it has to justify its action. We do not have to give it an Islamic justification. What we can say in this regard is that God has made everything on earth subject to man and has required man to look after other creatures.

You have only to remember the Hadith which mentions the case of a man traveling in the desert, and almost dying of thirst after he had used all the water he had. Then he found a well and went down to drink. When he came up, he found a dog panting hard of thirst. He thought, “this dog is as thirsty as I was a short while ago.” He went down again in the well and filled his shoe with water to give to the dog. The Prophet, peace be upon him, adds: “God has forgiven him his sins for doing so.” Reflect on this and remember that Islam considers dogs impure, yet God gives a very high reward for an act of kindness to a dog.

I entirely agree with you when you speak of the cruelty of depriving animals of their freedom of movement and their natural environment. May I say that if this is done for a more beneficial purpose, it is permissible and acceptable. If it is done for fun, then it is censurable.

I went recently to a tourist resort, and I found some animals kept in cages. What disturbed me most was the sight of three pelicans and a few flamingos which were kept in two cages. I tried to explain the people that it would much more rewarding to the birds and to the visitors if those birds were trained to spend some of their time in a particular place, but allowed to fly and fish as they like, particularly when the sea was nearby and there was a large artificial lake close by. They would not listen. To me that is an act of cruelty that cannot be justified.

The Prophet, peace be upon him, has given us a very sound advise when he said: “Be satisfied with what God has assigned to you and you will be richest of people.” This does not apply only to monetary matters. It applies to everything in life. If you are satisfied with your lot, you will not worry about what you have missed. This is the true meaning of self-sufficiency which is the basis of wealth. A person may have enormous wealth, but he will not feel truly wealthy unless he is satisfied with what he has.
While certain animals are created to help man in his life, as in the case of camels, horses, donkeys, etc. some are not made in that way. Therefore, treating animals should take their nature into account, and not subject the animal to too much duress.