Here is a commentary from John Gill:
**
there came forth little children out of the city;**the word for “children” is used of persons of thirty or forty years of age; and though these are said to be “little”, they were so well grown as to be able to go forth out of the city of themselves, without any to guide them, or to take care of them; and were of an age capable not only of taking notice of Elijah’s baldness, but knew him to be a prophet, and were able to distinguish between good and evil; and, from a malignant spirit in them, mocked at him as such, and at the assumption of Elijah; which they had knowledge of, and to whom, taught by their idolatrous parents, they had an aversion: some Jewish writers F24 say, they were called “Naarim”, which we render “children”, because shaken from the commandments, or had shaken off the yoke of the commands; and “little”, because they were of little faith:
**and mocked him, and said unto him, go up, thou bald head; go up, thou bald head;**meaning not up the hill to Bethel, where his coming was not desirable to the greater part in it, being idolaters; and perhaps these children were sent out to intimidate him with their flouts and jeers from entering there; but having heard of Elijah going up to heaven, as was said, they jeeringly bid him go up to heaven after him, and then they should have a good riddance of them both; thus at the same time mocking at him for his baldness, and making a jest of the wondrous work of God, the assumption of Elijah; which, with behaving so irreverently to an hoary head, a prophet of the Lord, was very heinous and wicked, and therefore what befell them need not be wondered at.
And he turned back, and looked on themWith a stern countenance, thereby reproving them, and in order to intimidate them, and make them ashamed, and cause them to leave off, but to no purpose; they repeated their mockeries with great vehemence:
**and cursed them in the name of the Lord;**moved thereunto, not from passion and a spirit of revenge, but by an impulse of the Spirit of God:
**and there came forth two she bears out of the wood;**which are fiercest, and especially when bereaved of their whelps, as these might be; the wood seems to be near to Bethel, perhaps in the wilderness of Bethel, of which see ( Joshua 8:15 ) ( 18:12 ) , and Reland F25 thinks it is the same with the wood of Ephraim, ( 2 Samuel 18:6 ) , though the Jews, to increase the miracle, say F26 there was no wood at all, and, if there was, that there were no bears in it; but though those creatures are mostly in northern countries, yet there were of them in Judea, see ( 1 Samuel 17:34 )
**and tare forty and two children of them;**it seems there were more than these; but such a number of them they tore to pieces and destroyed; which was very extraordinary, and was an awful punishment for their wickedness, which they knowingly and willingly committed, and of their parents in them, who had trained them up in such impiety, and put them upon it, and sent them out to do it.
Hope that helps explain it. It is really a moral lesson regarding the consequences of evil and wickedness.
God bless,
CEM