1 Samuel 6:2

And the Philistines called for the priests and the diviners, saying, What shall we do to the ark of the LORD? tell us wherewith we shall send it to his place.

The ark had remained among the Philistines for seven months, and throughout that time affliction and destruction attended it, for God's judgments followed it wherever it was carried from city to city. What had been seized as a trophy came to be regarded as a burden and a curse, and those who held it became anxious to be rid of it by sending it back to Israel to its proper place. In this distress they consulted their priests and diviners, also described as their rulers and princes, asking what should be done with the ark of the Lord and with what it should be sent to its place.

They were advised not to return the ark empty but to send it back to Israel with a costly trespass offering. That offering was to acknowledge Israel's God and to recognize that His hand was against them for taking the ark that belongs to Israel. By it they might seek relief and healing and learn why His hand still remained upon them.