Well, it's pretty obvious that it's Halsin if you've done some talking around.

You know from the grove that Halsin "is a bear", I think you also learn from Aradin (if he survived the goblin attack), that Halsin transformed into a bear. Or maybe it's the guy being tortured in the goblin camp that tells you this, or maybe both. Can't remember for sure. But at least you can easily learn that Halsin transformed into a bear while at goblin camp if you follow the quest directions. There's also more clues to the fact that Halsin most likely will be a bear when you find him.

If you miss all that and enter the prison without a clue that the bear is the druid you're looking for, and you feel it's wrong to side with a bear over humanoids, then I'd say that's part of the game and what makes it fun. You have three options, leave it there, help it, or kill it. It's pretty obvious that there's no peaceful solution here since the bear is clearly raging (=uncontrollable). So even if you'd have the option to convince them to let you have the bear and leave peacefully with it, the bear isn't going to just come out nicely and leave the tormentors alone. It's pissed and it wants revenge. So it's clearly going to attack the goblins first chance it gets.

You do also have the option to just leave the bear there if you don't want to fight. And I'm pretty sure you can convince the kids to stop throwing rocks at it?