This is also known as the Golden Rule, the center of all human ethics. Where people are concerned, it is necessary to enshrine this basic right in civil and religious law, because sometimes we have the tendency to cross other people's boundaries, or restrict other peoples freedom. This is not always done on purpose. Too often people only realize a border was crossed after the occurrence. The importance of freedom is similar to the importance of health.
Health is a form of freedom.
We don't know for sure whether or not animals can suffer and become ill when they are robbed of their freedom, but we do know that animals will do anything to keep themselves from being locked up. That an animal suffers from a lack of freedom or the ability to exhibit natural behavior is often deduced from the behavior that animals in captivity typically display. A common example is the restless rhythmic swaying motion that polar bears exhibit when their freedom of movement is restricted. In nature freedom is evident. Lack of freedom among animals only exists due to illness or old age, but luckily death then quickly liberates the animal from suffering.