The trouble which came upon the Philistines, because they had taken the ark, caused them to have regard for the God of Israel. Notice they still were talking about what God did to Egypt when He brought His people out under Moses, 374 years later. That event, the destruction of Egypt, left a huge and indelible mark on the pysche of the ancient world.
God was able to magnify Himself, and look after His own glory. He did not allow the false god of the Philistines to stand in His presence. Notice that the idol was not just fallen before the ark of the LORD, but it was fallen on its face as if in worship, before the ark of the LORD. 🙂
About Dagon: this is not his first mention in Scripture, as Samson was taken to his temple to be made sport of before the Philistines, and it was Dagon’s temple which was destroyed when Samson collapsed its pillars (Jud 16:23). Strong’s says of Dagon, that he was a Philistine deity of fertility; represented with the face and hands of a man and the tail of a fish.
“Now one of the principal gods of the Philistines was Dagon; this god had come from Babel, and was depicted as a man with a fish’s tail, or cape, who had taught the people of Babel all the wisdom of science, arts, mathematics, engineering, and agriculture. This curious belief arose because it was told of Noah that he came through the sea, whence he had preserved all the life and knowledge of the former world. The Philistines worshiped their ancestors as gods, even when they had forgotten who their ancestors were.” — Christine Miller, The Story of the Ancient World, p. 136.
“For no doubt you remember that one of the principal gods of the pagan nations was Dagon, depicted as a half man, half fish. This god was said to have taught the first people all the wisdom and arts of the gods, as was necessary for life. Now of course the man who had taught the wisdom of God, and the arts and sciences from the world that perished, was Noah, who had come through the Flood, or sea; but the pagan nations who had come from Babel had forgotten their true history. Thus their ancestor Noah came to be depicted as a man with a fish’s tail, and worshiped as a god by all those nations who had forgotten the LORD.” — Christine Miller, The Story of the Ancient World, p. 215.
So we see that even the most offensive paganism has its root as a perversion of the true knowledge of God, and the true history of the world; but the one book which has not been infected with this perversion, from which we can draw true knowledge of the history of the ancient world, is the Hebrew Scripture. In its historical statements, it is completely accurate in every detail, and not one discovery from archaeology has ever disproved any historical statement made in the Bible; but find after find only confirms them.
For further reading:
Dagon: The Philistine Fish God – Associates for Biblical Research
Dagon, Cybele, and Catholicism (includes pictures of Dagon from Assyrian reliefs, showing that his description as a half man, half fish, did not spring up from the imagination of the Jews without any basis in historical fact)