It seems to me that the key to the answer to your question is to understand the unique role of the Book of Judges. The statement that is repeated in this book is, “there was no king in Israel; every man did what was right in his own eyes” (Judges 17:6; 19:1; 21:25). Judges is not a book about heroes whom we are to imitate. It was one of the darkest times in Israel’s history — you might almost call it the “dark ages” of Israel’s history. The purpose of this book is to show the low spiritual state of the nation, which prepares the way for the coming of Israel’s kings.
There are no “David and Goliath stories” in this book. We begin with the account of how Israel failed to completely drive out the Canaanites, as they were supposed to do (chapters 1-3). As a result, Israel began to do evil in the sight of the Lord (3:7). The story of Deborah and Barak and Jael is the sad story of a nation whose men did not have the courage to lead, so that women were used, to the shame or the men (chapters 4-5). The story of Gideon is the account of a man who was terrified of the enemy, and who in a very faltering way followed God, bringing victory to Israel(chapters 6-8), but eventually leading the nation astray (8:22-28). Samson is yet another terrible disaster, who kills many of the enemy, but who is also dominated by his fleshly desires (chapters 13-16). The story of the Levite priest for hire in chapters 17-18 is tragic. Israel has stooped to the immorality of Sodom and Gomorrah. This story about the Levite from the hill country of Ephraim in chapter 19 is so terrible I had several men decline to read this text of Scripture when I preached on it.
The sacrifice that you have mentioned is but one more horror story in this book. God was no more pleased with what Jephthah did than he was with the immorality of Samson. It was a foolish vow that he made, and then (to save face) he kept it. The heathen sacrificed their children to Molech; and now Israel’s leader was sacrificing his child as well. Not only was the nation Israel corrupt, its leaders were corrupt as well. Thus, the need for a godly king. Judges, then, sets the stage for the Book of 1 Samuel, when Israel gets a king.