So, back in the day, when Israel was still a new kid on the block, a loose alliance of tribes with the same religion and ancestors, the Philistines, a rather more sophsticated group, go out to war to ensure the Israelites know their place (4:9). On the first day of fighting the Israelites get wooped (4:2) so they decide to bring in the artilery, i.e. God. The Israelites are confused, they think God lives in a box, so they get this (very special box called the Ark of the Covenant) and take it with them to the battle the next day. The Philistines hear about this and are terrified, but decide to man-up and try their luck anyway. The Israelites get wooped (again) and the Philistines get the box (4:10-11) and take it home as a souvenir and put in in the temple of their god Dagon. So much for the Israelites having God on their side.
Now God doesn't live in the box, but it represents the covenant God has with the Israelites, so, if you like, it's a bit like a wedding ring represents a marriage between two folks. So God feels pretty strongly about this box and the way people treat it, because God feels strongly about God's relationship to Israel. The next day the Philistines get out of bed, go to the temple of Dagon and find the statue of Dagon on his face before the box (5:3). Now this can't be right because they beat the Israelites, so their god must be stronger. So they pick Dagon up and go about their business. The next morning Dagon is eating dust again, but this time his head and hands have fallen off (5:4). As if to prove the point there is then an outbreak of tumors in the town and surrounding area. The locals are pretty fed up with this so pass the 'victory spoils' on to the next town, who are similarly aflicted (5:8-9). So it goes on (5:10). Eventually they realise that, although they wooped Israel, Israel's God has got them wooped. They are going to have to give the box back (5:11). So they do, complete with a special 'sorry' note in the form of 5 golden tumors and 5 golden mice (representing the rulers of the Philistines, 6:2-6).
Now I love this story because it is very funny. But also because it is loaded with theological content. First, the Israelites try to use God's ark like a magic charm to force God to help them when their own relationship with God is in tatters. They treat God like a slot machine: 'if we carry the Ark, we will win.' God doesn't turn up to help because to do so would only compound the problem. The Israelites think their great need is to win in battle, God thinks their great need is to sort out their relationship with God. Remember this, God is not to be manipulated by religious formulas, God demands a real relationship from God's people. Sort that out first and then let God worry about your circumstances.
Second, the Philistines think that because they have defeated Israel they have defeated God. But God and God's people are not the same thing. The Israelites are defeated, not because God is weak, but because they were being unfaithful to God. God shows God's-self to be so overwhelmingly great that even the statues of the Philistine god has to bow down to the Ark of the Covenant. Remember this, a crappy church, or crappy Christians do not mean a crappy god. Even when God's people are way off course God is still great, and God is still good. Don't use the behaviour of others to justify your unbelief, look at God to make that decision, not people.
Third, it is the pagan Philistines who are the first to start behaving respectfully towards the box. They soon realise that God was not wooped along with his people, and presumably also that if God had been on the Israelite's side they would never have won (see 7:10). After the box is returned to Israel it takes decades for God's own people to learn the same lesson (see 2 Sam 6). Remember this, those who are outside of the church are often showing those of us in it the way to go when it comes to justice and righteousness and honouring God. Don't refuse to learn lessons from people just because they have a different creed to you (or no creed at all).
Fourth, despite the unfaithfulness of Israel, God still cares about the covenant God has with them, and shows it, not by disguising the fact that the relationship is dysfunctional but by demonstrating the supreme holiness (special-to-God-ness) of the box that represented that relationship. Israel is unfaithful, but God remains faithful and works to bring Israel back into right relationship with God. Remember this, when you fail or fall away, God is not defeated, when you make mistakes or are stymied, God is still greater. The answer is not to question whether you followed the right formula or not but to seek to show (in grateful response) the same faithfulness towards God that God continues to show to you.