Have you seen trapeze artists hanging upside down from bars in a circus? They do it with great concentration.
Bats also hang upside down from cave walls or tree branches. And they do not need to put in any effort to do so. For they hang upside down only when they are resting.
They use their legs to hold on to some cracks or crevices on walls or branches of trees. This way, their stretched muscles take the entire weight of the body.
Their legs are so weak that they cannot even walk. When they want to walk, they drag their bodies on the ground.
There was a time when bats could walk. But that was long long ago.
Then they gradually began developing wing-like structures on their limbs which helped them fly.
And now, after all these years of evolution, they have perfected the art of flying. They do it so well that they are, in fact, the only mammals in the world who can fly for long distances without a break.
But with so much of flying, they have lost their ability to walk. Because they stopped using their limbs. When you don’t use a car for long, it begins to get rusted. And, after some time, you cannot use it anymore. Similarly, since the bats’ legs were not used, they lost their strength and could not support the bat’s body anymore.
And, now they can only use their legs to hang upside down when they are sleeping.