Because they need to put their feet up.
Since bats are the only mammals who can fly, with wingspans ranging from 6" to 6', they failed to make great strides in the walking-about, or in the standing departments. Their legs and feet are simply not strong enough to support these functions for great lengths of time.
For this very reason, bats, when in their bat caves, or roosting in trees, take the weight off of their tired limbs by hanging upside down. Their breast-feeding babes, born live, as are all mammal offspring, have no choice but to hang in limbo with mom. Together, they reap the benefits of downward gravitational pull. (With thanks to Cool Quiz.com)