It’s all down to some very clever anatomical adaptations
In your case you have to hang on for dear life as your finger muscles are contracted. A bat‘s muscles are relaxed in the clinging position. Instead a tendon tightens to hold the claws in place. (Birds do the same).
The tendons are joined to the fingers in such a way that the weight of the hanging bat keeps the claws in the right position to maintain a grip – again without exerting energy. Tis is why bats cling on to a surface even when dead ( as is the case in the photo above This is why when a licensed mist netter removes a bat from a net his/her first move is to lift the bat upwards slightly. If (s)he pulls downwards the bat’s grip automatically tightens. It loosens on the uplift.Bat feet lack an opposable thumb, which would need energy to keep it gripping. Instead the five claws are all the same length and are extremely curved. The claws are hairy which allows them to maintain traction on almost any surface.
The hind limbs are positioned so that the knees, when bent, point backward while the bottom of the feet face forward. This is made possible by a 90-degree rotation of the hip joint and makes it easier to grasp. It also means that the bat can lean forward to groom itself which you couldn’t do even if you had mastered hanging from the door jamb by your toes. Horseshoe bats often perch on one leg swivel to keep an eye on what is going on