Children brought up in a religious household can have trouble - especially the younger they are and the more immature they are - comprehending two very different messages: On the one hand, they are told of God's gift of grace (as opposed to works). But then there's the other message that any parent, religious or not, has to impart to their children - and that's a message comprised almost entirely of "works". Eg, you have to do your homework or you can't use the internet. You have to do your chores if you want to get paid. And so on and on. Even at school, it's works-based - ie do the work or you don't get the A.
Basically, you have to use the carrot and stick with them (works), while simultaneously telling them you love them no matter what they do (grace). But the younger the child, the harder it is to understand this dual, seemingly conflicting message. They see things on a simpler level, where discipline looks to them to be the opposite of love. "If you really loved me, you wouldn't ground me!"
They don't feel like they're loved while being disciplined. And I think that can spill over, especially the younger they are, to their view of God. The message of "100% grace, 0% works" can get contaminated by the fact that their day to day relationship with their parents is "50% works, 50% grace" (or some other ratio, depending on the parents). And so, as seen in Murray's writings about laying awake at night worrying about his salvation, they don't or they can't believe the message of God's grace, and instead are certain that works just MUST be part of the requirement, and that they are failing to measure up.