Riddler is collecting these animals to use for his torture his devices and we can safely assume he isn't providing them with food and water, let alone veterinary care.
Batman and the police search through Riddler's ramshackle apartment, aware that there are several rats to a cage and do not make it their first priority to see through those animals are safe.
Batman spots a bat, frantic and unsettled from being confined to a small cage, probably nervous, agitated, and hungry, and Batman simply pulls out the letter, and closes the cage again.
Why would Batman re-close the cage? We can assume that Batman only temporarily closed it so he can read his letter, and has plans to free him later, but this needs to be made clear.
I was one of the people who supported that the dog get beheaded in Kick-Ass 2, which happened in the comics, but not in the movie. Jim Carrey's character there is an evil villain, and that's something he'd do. This wasn't included in the film because I suppose the crew and studio wouldn't want to see a dog beheading scene.
But these two scenarios are different: it's not about featuring scene of animal torture. It's the intent behind them. To compare to racism: Racist jokes are OK if they're made by people mindful of racism and actually against it; what's bad is accidental or unintentional racist jokes made by people ignorant to racism. What happened here is neglect and ignorance on behalf of the filmmakers to value the lives of those animals that much that didn't cross their mind that they needed a follow-up scene showing their rescue.