The Plishtim or Philistines captured the Ahron Kodesh from the Jews (Shmuel I Chapter 5), then they returned it with a gift of golden rats and hemorrhoids as that was what they were punished with for stealing the Ahron Kodesh (Holy Ark) (Shmuel I 6:4-5). Now I would say that's in bad taste, but they were pagans and would worship in strange ways, like defecating to their gods, so this is just par for the course. Here is what throws me off: We save it and store it by the Ahron Kodesh with the Luchos! What is the deeper significance of these two type of gifts that they were bestowed such a great honor? Let me clarify: why did the Jews feel it important to memorialize this gift?
"The box in which the Philistines sent a gift to the G-d of Israel was placed next to it" (Bava Basra 14a).
To expand on Shalom's answer:
The basic reason that the Philistines made these particular images is that these were the plagues they had been struck with (I Sam. 5:6 and Rashi there). Malbim (to 6:4-5) explains that the Philistine "priests and magicians" (6:2) had two points in mind:
G-d's punishments always relate in some way to the type of sin committed. So they informed the people that evidently their sin (in taking the Aron) could be depicted using these forms, and therefore these would be an appropriate way to show their penance.
Human doctors cure diseases using their opposites; indeed, having the disease-causing agent around can worsen the patient's condition (he gives the example, from Yoma 84a, of a person bitten by a mad dog seeing any dog afterwards). By contrast, Hashem heals using the same agent with which He causes sickness, as with Moshe's copper snake. By making images of the very plagues that afflicted them, the Philistines would demonstrate that they recognized these plagues to have come from G-d rather than as natural happenstance.
As for the fact that this box was given such a place of honor next to the Aron (and even hidden away with it, Yoma 52b), the Aruch Laner (Minchas Ani to Parshas Korach) suggests that this is meant to implicitly refute the argument that the non-Jews won't respect us if we study Torah rather than their sciences. Here we see, to the contrary, that the Philistines respected the Torah so much as to send along a gift when they returned it! And that serves as a lesson for all time.
Another point, too, is that this was the first time in history that an entire non-Jewish people recognized G-d's power and tried to appease Him. This deserves to be highlighted, as indeed the verse does, listing each of the five major Philistine cities and its "golden hemorrhoid" separately and in a festive tone (6:17, see Daas Soferim). It therefore also deserves to be placed in the Kodesh Hakodashim, as the first step in the long process towards the time when all of the peoples of the world will achieve this realization, with the coming of Moshiach.
The Philistines had been afflicted by hemhorroids, which were then irritated by rats, as a punishment for stealing the Ark.
By their thinking, they could appease the Ark (or whatever force behind it) and stop this nuisance by returning the Ark, along with some golden rats and golden hemhorroids, for good measure. Nothing to do with how they worshipped; it had to do with what they wanted! (Or "wanted to stop"!)
I suspect part of why the Jews left the gift in-place was to remember this episode. A.) The Ark is great enough that it was recognized by other nations. B.) Don't take it for granted, it could be taken away. (A message Jeremiah kept trying to impart to his people regarding the Temple a few centuries later, while they continued to rest on their laurels.)
There is a whole dvar torah on this but to summarize:
- One of the ways we degrade avoda zara is by relating it to excrement (avodas gilulim)
- Avimelech, king of the plishtim, was punished by having orifices stopped up
- The midrash explains that the 7 presents Avraham gave Avimelech afterwards let to 7 calamities in Jewish history. One of which being the Plishtim capturing the Aron.
- The Plishtim were punished with hemorrhoids to show both the folly of their idol and how they had abrogated the covenant with Avraham.
- Their gift was in essence an acquiescing to the denigration of their idol.
- Outside validation, by our enemies, is seen as a lasting kiddush Hashem (for example we sing Ma Tovu Ohalecha, which is a statement of Bilam validating the encampment of Yisroel).