Beorn, as others have noted, is like a character out of another story. He is, on the one hand, the sort of person to catch a goblin, torture it until it talks about what it has been up to, and then kill it anyway. He is also fairly grumpy to even those (like Gandalf, the dwarves, and Bilbo) who he does not dislike.
On the other hand, he literally speaks with animals, and given the way that we (and presumably also goblins) treat them, he probably finds it all to be "turnabout is fair play". I am reminded of the scene in one of C.S. Lewis' Narnia books, where a distinction is made between eating deer (perfectly fine) and eating Talking Deer (abominable). Beorn is making no such distinction, it's all abominable to him, and perhaps this is because in JRRT's Middle Earth animals are not so easily divided between sentient and non-sentient.
There are many scenes in both The Hobbit and LotR that are merely hinted at, but if you take the time to imagine them in detail they are quite arresting. The nighttime dance/moot of the bears at Beorn's is one of those. One wonders how many of those bears were also capable of assuming a human shape? Bears in our world aren't particularly social, certainly not in gatherings of that size. It could be that these were, simply because it was Middle Earth and not Here and Now, but it seems equally plausible that Beorn is not the only one of his kind. He ended up having children with someone, after all. Are they all grumpy like Beorn? Do they only get along when in bear form and dancing? Or is Beorn grumpy because he knows he's talking to people who eat other animals, and that's hard for him to look past, given that he talks to them?
Last year I read JRRT's translation of "Beowulf", and it had with it as an appendix his imagined recreation of a folktale with a main character named "Beewolf", who I'm realizing bears more than a little resemblance to Beorn. Definitely the whole atmosphere at Beorn's house resembles an Old English mead hall more than anything later. JRRT believed that the ancient Beowulf epic was a mashup of several pre-existing stories, some from folktale traditions and some from epics based on historical events, and it feels like he is trying to do something similar here. Beorn has his own story, I think, and is just making a cameo in this one.
One also has to wonder if any of the other animal servants were also shapeshifters. Did the dogs walk on their hind legs because they were trained to do it, or because they were not ordinary dogs? Certainly not _that_ ordinary, anyway, as they appeared to have their own language.
Bilbo is mostly still helpless, here, but he does occasionally do something like notice that Beorn is pacing them, to keep watch on his ponies, which the dwarves do not notice. He is mostly helpless, though, because he can be, given that Gandalf is still there. When Gandalf makes it clear he is really leaving soon, Bilbo weeps. This is a sign of how much he has been depending on Gandalf's presence for reassurance that it will work out. Once Gandalf is gone, he knows (at some level) that he cannot rely on the dwarves to keep it together (and, you know, well he should not).
Chapter 8