Even when they're writing realistic fiction, writers sometimes have to stretch credibility to make a story work. Novels are often about larger than life situations and adhering to real life rules would take all the fun out of them. This is especially true in juvenile fiction, where plots focused on kids doing things the child reader could never do is part of the appeal.
Sometimes writing things as they would really happen would even hurt the story, as in this reader question:
I asked a question on a writing forum and someone brought up an issue of legality within the novel's plot. My MC is a 12-year-old boy who is recruited by a secret part of the FBI for various reasons including his recent alien abduction. I was trying to decide if the parents should know about his job or not. A commenter asked about the legality of having his parents not know. Of course in the real world that would be an issue but how/when do you worry about those things in fiction? Specifically in a sci-fi or fantasy setting where the rules of real life are already being broken? When do you twist legality for the sake of plot?
In this situation, I see no reason why the parents need to be notified or asked about the FBI job. Readers already have to suspend disbelief to buy the premise, and putting reality into it would probably make it less credible, not more. It would draw attention to the fact that this is a strange situation the child couldn't do without permission, which spoils it. It would also make the child reader feel like the adventure couldn't happen unless Mom and Dad said okay. (And where's the fun in that?) It takes the power away from the child, and middle grade fiction is supposed to empower children.
But if the author did want the parents involved and the situation to be more realistic, then I'd suggest having to get parental permission be a goal of the child protagonist. He gets an offer from the FBI, but he has to find a way to get her parents to agree to it first and he knows they won't say yes. That puts more realism back in, and makes it a problem for the protagonist to overcome. It's also an obstacle kids can relate to--having to get permission to do the really cool stuff. It could even be something he lies about or fakes (like forging your parent's signature on a permission slip) that comes back to bite him later.
When considering legalities like this, think about who the novel is aimed at. Young readers aren't going to care about what's legal and what's not, so having a kid work for the FBI is just fun and seems perfectly normal if it's set up in a plausible way. The whole point is to do something "fantastic" and outside the boundaries of reality. Not adhering to real world laws won't make the reader stop and think, "Hey, that can't legally happen."
If this were an adult novel, then you'd have to worry more about the legalities, because your readers are going to notice and care, and that can hurt the credibility of the novel. When an adult stops reading and questions the plausibility of the plot, you risk losing them. They don't buy it, and once that faith is lost it's hard to get it back. They stop trusting you as an author. You have to play by the rules or they'll call you on it.
However, you can establish some of those rules, so if you have to do something that isn't "real" to make the plot work, find a way to make it plausible, even if it's bending laws or rules a little. Readers are willing to suspend disbelief as long as it makes sense.
There's a shifting line of where plausibility lies in fiction, especially fiction for kids. Much of MG fiction wouldn't exist if writers stuck to what could really happen. Kids typically don't work for the FBI or chase after spies or catch criminals in their spare time. They don't do most of what the characters in their books do.
Reading is a way to escape and have a little fun, and kids (heck, even adults) want to read about the things they wish they could do, not actually do. That's why parents are rarely involved in the story in MG novels. It's not about kids going to adults to fix their problems, it's about kids being independent and doing what they'd never do in real life.
As a general guide, if it makes the story better, twist all the rules you want. If it will make readers stop and question the credibility of the story, then look for a way to make it more plausible.
Have you ever read a novel that made you stop and think, "No way, that would never happen?" How did it make you feel about the book?