Tom Gradgrind is a hard man- with a hard, utilitarian philosophy- but he adopts a little travelling girl on a whim, going clean against everything we've been told about him- and the little travelling girl- who had a perfectly secure future among her own kind- accepts without demur. All this counter-intuitive stuff happens simply to set up the plot and the moral. Dickens novels often end in grindingly implausible contrivance, but I can't think of another one that begins that way.
Still, this is Dickens- and he's brilliant. The people, when they're not behaving out of character, are delicious. Remember Monty Python's Four Yorkshiremen- with their increasingly lurid tales of childhood deprivation? Well, they learned everything they ever knew from Josiah Bounderby of Coketown, sir!