From my early readings about Philistia I remember statements to the effect that what we’re seeing about them in scripture is the opinion of outsiders.
So people from the land side of the coast looked at these sea people who kept arriving on their shores and making incursions and setting up cities. And they labelled them as if they were a group with a common political base. But, said long-forgotten authors, the Philistines came from various foreign ports who fought among themselves and did not have central leadership.
They often found it convenient to align their efforts with other sea people against the land lubbers. But those alignments may have been short-lived.