The garrison (outpost) was likely built in order to control an important trade route which passed through Gibeah.1 The presence of such an outpost needs to be reconciled with the victory over the Philistines that was previously achieved under Samuel (see 1 Samuel 7:13–14). It is unclear how the Israelites could recapture two cities (1 Samuel 7:14) and yet still have Philistine outposts remaining in the land.
5 After that you shall come to Gibeath-elohim, where there is a garrison of the Philistines. And there, as soon as you come to the city, you will meet a group of prophets coming down from the high place with harp, tambourine, flute, and lyre before them, prophesying.