The journey of the Ark. God is very clearly against everyone here. It’s really quite simple: God doesn’t support the lesser of two evils and doesn’t have to be on anyone’s side.
Israel tries to use God like a super-powered good luck charm. They try to benefit from God’s presence without keeping their end of the deal. They expect God to work for them rather than pursuing his service and his will, and he makes it very clear that this will not be tolerated.
The Philistines are permitted to capture the Ark. However, everywhere the Ark goes, people get sick and die. Bad things happened. Israel was meant to lose the Ark, to be punished, but the Philistines were not meant to keep the Ark. It was not for them. God was not about to allow the Israelites to use him, but he wasn’t going to abide with the Philistines, either.
It’s pretty dramatic. Can you imagine? You believe you’ve won this great victory, proven your god is stronger than your enemy, and… your god’s idol keeps falling over, and then it breaks. I mean… seriously. The symbol of your god’s presence and power just keeps… falling over. On its face. Until it’s head breaks off. And then everyone gets sick. Really sick. People are dying. Some victory.
So you pass this thing off to another town. Same thing happens. It’s the worst game of hot potato ever! Finally, you hook it up to some cows and send it off as far away from you as possible. And the cows know where to go. Do you still doubt where the real power is?
Even in our failures, God can work. He brought the Ark back to Israel just fine, and added to his own reputation while he was at it.
To reiterate a recent point: God is not on our side. We are given the opportunity to be on his.