Hmm. My experience has been different.
Hopefully not, but I think there can be problems.
For instance, I know several ex-Christians who took quite a long time to get over the fear that they'd end up in Hell for following their heart and judgement by leaving their church. And imagine what it would be like to realize as a teenager that you were gay, after having been told for most of your life that homosexuality was an offense before God? In these sorts of cases - as well as many others - I don't think that religion can be seen as a net benefit to the child.
I think that bringing up a child in a religion does to a large extent tie the child to that religion. Whether this upbringing will become the anchor for the faith of the adult the child becomes or the ball and chain that stops that adult from following the path they truly want is certainly not clear while the child is young, IMO.
Unless you shelter your child from the world completely, it's going to come up sooner or later. What are you going to say when your child points at a synagogue and says "Daddy, why are those people going to church? It's Saturday!" or points at a Sikh man and asks "Daddy, why is he dressed different?"
Generally, I think that hiding kids from the truth is a bad strategy.
I didn't mean hiding kids from the truth. I meant telling them what you believe, if they ask questions, then tell them the answers! Obviously I wouldn't lie to my child about something like that. You must agree though, that a child does not give religious matters much thought until adolescence. And I believe in telling my child what I believe to be true, not of course shutting them off from the world around them, in that sense you are correct, if my child asked a question like the ones you posed at the end of your post, then I would answer truthfully. However, I believe in everyone telling their child what they believe, without any force, just telling them, and making it clear that they can choose to believe that or not. You talked about someone being told that homosexuality was bad and then finding out they were gay. THis does not apply to all people. I don't think it's evil, and I would not want to put pressure on my child, by telling them of possible punishments etc. I think everyone should just tell their child what they believe, and let the kid make his/her own decisions.