Stories tells that a woman had sex with someone else than her husband. Maybe she did not even have a husband. She then get pregnant and gave birth to a baby. This way to make a baby was not accepted by church and society - that kind of baby is called bastard. Mother had to kill her bastard child to avoid being blamed by priests or other people. Mother then buried child outside graveyard and without priests blessing the body. Soul of baby could not go to heaven because his/her body was not at graveyard and was not blessed by a priest. This is why she became a ghost.