v1: The Philistines removed the ark from Ebenezer. This means 'stone of help', and is ironic since help from God, which the Israelites had expected, did not come. Contrast 7.12.
v2-5: The Philistines treated the ark with some reverence; in 4.7 they cried out, "a god has come into the camp!" They had now captured this 'god', and put it into the temple of their god, Dagon. They were ignorant of the truth of Hannah's words, "there is none besides You" (2.2). The fact that the image of Dagon twice fell down whilst the ark was in the temple was a sign of the great power of the true God, the God of Israel.
We should not expect idolatrous 'heathens' to act and react in the same way as those who believe in God. Equally, true believers must not act as unbelievers.
v6-11: As the ark of God was moved around the Philistine cities, God afflicted the people with tumours. His hand was "heavy upon us"; like the magicians in Egypt, they testified to the "finger of God", but they clung to their idolatry. Even the demons believe and tremble. They treated God as a thing to be manipulated, rather than the Lord to be worshipped.
v12: In the plagues, many had died; it is a dreadful thing to fall into the hands of the Living God (Heb 10.31. All this was part of God's plan of restoration for Israel.