Though it is possible that the Philistines sought to expand further into Israelite territory,1 it is more likely that the Israelites, following a request from the men of Judah, gathered together to try and free themselves from the power of the Philistines (see Judges 15:11).
1 And the word of Samuel came to all Israel.Now Israel went out to battle against the Philistines. They encamped at Ebenezer, and the Philistines encamped at Aphek.