A lot of the world is pretty bad about things like not keeping their word. You see this come up a lot in fiction, which likely reflects the embittering experiences of the author.

In one of the Jurassic Park movies, the father is blaming the mother for letting the kid sleep with a night light and then there really is a T rex in the backyard and it's just eaten the family dog.

In one of the Aliens vs. Predators movies, the father is dismissively telling the child "There's no monster. See!" and shines the light on the window which illuminates the Alien and it breaks through the window to kill him. Logically, the child was next, but the scene cuts away before the child is attacked. So you get sort of a fantasy depiction of some asshole father getting what they so richly deserve, to the satisfaction of the child who has been dismissed their entire life.

One video game has a meme "The cake is a lie." It's a hugely popular meme and probably because a lot of parents promise desert if the kid behaves and don't necessarily follow through.

Gifted kids aren't necessarily more moral, but they are more articulate, will have a better memory and a bigger vocabulary and are somewhat inclined to be argumentative. A lot of them will call the parents on "But you said..." and will remember it if the parent basically screws them over after being reminded of what they promised.

Kids tend to universally feel that if you said you would do X, that's a promise and you are supposed to keep your promises. Gifted kids just do a better job of remembering that you said X and arguing it with you and tend to have a raft load of other strong personality traits.

The higher the IQ, the more likely they are to qualify for other labels as well, such as OCD, ASD and ADHD. So some of these kids get really wrapped around the axle about things when adults make a promise and then break it and it becomes clear that the adult never really intended to keep it. They were just screwing with the kid for convenience' sake.

The same clear, bright line of logic that makes some kids good at math or science plays out socially as a strong moral position, whether it is intended that way or not. I have a strong interest in social stuff and I am routinely assumed to be talking about morality when I'm often saying something more like "gravity doesn't work that way."

People think social stuff is fuzzy and hand wavy and you can't research it. It's hard to research, but there are some things we know and there are some best practices for determining some things and I just find that stuff interesting. But people almost always feel I am being judgy, probably because most parents raise children with either a guilt model or a shame model.

I didn't use either as a parent. I raised my kids with a model of enlightened self interest and I taught them things like "You have to pick your battles. You don't have to back down just because someone is mad that you did X, but if you don't have a good reason to keep doing X, maybe them being mad is good enough reason to give it a rest already."

So they got schooled about social dynamics in a way that's pretty uncommon.

Anyway, it's not that they really frame it as morality per se. It's more that they do the same thing all kids do -- expect you to keep your word when you make a promise and things like that -- but they are more articulate and have a better memory and are more inclined to argue things for various reasons. For parents trying to take some easy way out and be lazy and say "There will be cake if you are good" when they don't actually mean it, this is endlessly problematic and comes back to bite them, doubly so if the kid is bright.