A bastard shall not enter into the congregation of the LORD; even to his tenth generation shall he not enter into the congregation of the LORD." (Deuteronomy 23:1-2)
If someone has the misfortune of being born as a result of his mother being raped he is excluded by this edict from worship for 10 generations. This is punishing the child for something that happened between the 2 adults that parented him. It is most probably very likely his mother did not intend to have a child out of wedlock. This bible verse demonizes children out of wedlock. A bastard child does not have the same access to god as a child whose father claims him. I remember that the word bastard carried very heavy shame up to my generation. The shame of birthing and raising a "bastard" has no doubt been the cause of women for centuries risking their own life to resort to self-induced abortions to remove a pregnancy that would result in a stigmatized "bastard" child. Thankfully, the stigma has been lifted in our present culture to the point where now up to 45% of mothers birth babies out of wedlock. To take the bible literally those children would not be allowed to enter a church or a synagogue for 10 generations.