This is a great question! If we read Judges 11-12, we will find out about a judge named Jephthah. He lived in Gilead and he lived in a time when things were difficult for the Israelites. In this time of distress, he was asked to lead the Israelites against a foreign enemy, the people of Ammon. During this conflict, he made a very rash and foolish vow, which he regretted later on. He vowed to sacrifice to God the first thing that came out of his house, if God should give him victory over the Ammonites.
According to the book of Judges, here are his words:
"If you give the Ammonites into my hands, whatever comes out of the door of my house to meet me when I return in triumph from the Ammonites will be the Lord’s, and I will sacrifice it as a burnt offering."
Unfortunately for Jephthah, his daughter came out to greet him on account of his victory. As the story goes, he had to offer his daughter. After this, there was a tradition in which the women of Israel go out to remember the sacrifice of Jephthah's daughter.