Kids' stories often try to explicitly preach a moral. You may not realize it, but in fact every story pushes a message of some kind, even if it's not a moral one. Most of them have countless morals. We just don't tend to notice the uncontroversial ones (eg. killing people is bad / people own the fruits of their labor / unless the government wants them), or the ones that are so well-done that they just sneak in entirely subconsciously. Let me give an example:
Star Wars: A New Hope. A story surely everyone reading this is familiar with. You may think this was a story told for fun and/or to make money rather than to push any specific message, and you may be right, but nevertheless let's see how many I can identify:
When one commands great power, there is no positive obligation to use it for good. This comes from the revelation that Ben Kenobi is a powerful Jedi who can manipulate people's minds and stuff and yet he's living as a hermit on some obscure planet instead of helping the rebellion. Nobody in the film ever calls him out for this, and as a result, the story sends the message that that is okay. You want proof? I bet you didn't even notice this while watching the film! (If you did, a lot of other people didn't, myself included.) The moral is so powerful that it leads someone who believes against it to see someone do it and not even question them at all. If you didn't realize this slipping in and then later criticized someone in real life for doing the same thing, and they pointed out your inconsistency for blaming them but not Ben, you might find yourself questioning your beliefs. The convincing power of morals in stories is clear.
Skepticism of the supernatural is bad. This comes from the scenes where Han doubts the existence of the Force, Ben doesn't just prove it to him even though he easily could, thus making his doubt rational, but then he's later proven wrong. Also the scene where Luke is in the trench near the end and decides to switch off his targeting computer and simply trust his feelings because he hears the voice of a dead man telling him to, and is rewarded for it. Albeit Luke had seen earlier in the film that supernatural things definitely existed in his universe, there was at least no particular evidence that speaking to the living after death was one of them. I'm pretty sure it would still be considered at least a questionable decision if a character were to do that in a more modern story. At the very least his commander should have been totally freaked out at it (not "Luke, you swiched off your targeting computer, what's wrong?"), as he hasn't seen what Luke has.
There's nothing wrong with monarchy. This comes from that Leia is a "princess" and is still on Team Good, with no flaws ever portayed.
Artificial people are property. This one is really shocking given the history of America and how sensitive a lot of our culture is to slavery/racism. Yet nobody has any problem when the droids, who are presumably sentient, are abducted and sold by the Jawas, about to have their memory wiped for no reason by the hero, or even themselves claim to be the property of humans. Really goes to show the power of fiction as a way to push morals. By simply having none of the goodguys question it, you can show our modern audience a world where an entire class of people have no rights and nobody bats an eyelash.
Battle is not scary. This comes from how the heroes, who are more or less ordinary people, never express an ounce of fear when being shot at by a trained army and knowing they could die at any second. I know this isn't technically a moral but it's still a potentially harmful message as it downplays the courage of real people who voluntarily enter such situations.
So hopefully I've made the point fairly convincing without spending too much time on it. On to the main point: how to notice and control the morals you insert into your stories. The way I see it, there are six main ways to push a message. The more you use at once, the stronger the message is, but watch out - if you make it too overt, the reader feels preached to and closes their mind to your message, maybe even dropping the story.
Something is done or proposed by an otherwise good character
No one questions or criticizes it, or everyone who does is a villain
The action is successful or has good consequences
The victim (if applicable) doesn't complain
Conversely, if even the person who did it ends up regretting it, that's a very strong message that it was wrong
And, the heaviest method of all: the characters even discuss the idea, with some of them being critical, but at the end of the discussion, either everyone is convinced, or everyone who isn't argued in a way that the reader looks down on, such as with ad hominem attacks.
If you like, I have some examples of using these techniques in my own novel, Pillars of Life. For example (I'll mark spoilers)...
In the end of the novel, Jaydin and Nayomi discuss what to do with the world, now that they're basically omnipotent. They decide to use their power basically as Anarcho-Capitalist vigilantes. It doesn't even occur to them to institute a democracy. (The moral is a little weaker than I'd like it to be since they never saw an example of democracy to give them the idea.) Methods 1 and 2 are used.
In chapter 4, the rebel children decide to try and steal some food from the government, mostly just as a symbolic defiance. This is exhibiting the virtue of Ambition. Since they even end up convincing Nayomi to join them, it sends the message that this is right, since she is generally the stolid, prudent one who would be the most opposed to such a reckless plan. It also works out well. Actually, in hindsight I'm a little worried that having them convince Nayomi was too preachy. Methods 3 and 6 used (I don't count method 1 becuase it was originally proposed by Mitilda, who is clearly portrayed as erring on the side of recklessness).
The discussion of the metaphysics of the soul in chapter 9, prompted by a discussion about the moral ramifications of the realization that we don't actually know what happens to people after they die. This is the heaviest one as it employs the final technique I listed above, but I didn't go into the deep end of my beliefs. I stuck to simply defending the idea that people's souls can exist without their bodies. I hope nobody will drop the book because of that, but I think it's okay because it's so far in, and the belief still doesn't end up impacting the plot or anything. Methods 1 and 6 used.