It isn't about 'hurt feelings' either, as every child's desire is to invite their personal friends to their own happy birthday party.
I mean, it's not good logic to expect anything other than wanting to invite only their own personal good friends to their party.
Unless every child in the school class is a personal good friend, then there is no sound reason to invite them all for a child's personal happy birthday party.
There is absolutely NOTHING wrong or bad about only inviting your close personal good friends to your party.
From the neighborhood, or school, or church, etc.
NOTHING wrong with it.
And reasonable folks from the neighborhood, school, church, etc. know this.