Because hanging upside down allows them to roost in places where predators like birds of prey wouldn't be able to find them - dark nooks and crevices. There's also less competition for these kind of spaces, because no birds can perch upside down.
There are also more "osbtacles" and "sounds" on the ground, which would interfere with a bat's sonar - their ability to tell what's around them.