Animal finds in the foundations of ancient and medieval buildings are quite common; the blood sacrifice was later replaced by burying a few bones to protect the house.
Why were cats buried in the walls? A possible explanation is that the cat is a kind of cat scarecrow left behind the walls to scare – magically or truly? – any passing rodents. And yes, the particular house belonged to a grain merchant!
Art historian Helmi Üprus provides a link between the mummified cats and a letter by the Tallinn city government in 1717. Addressed to Governor General of Russia A.D. Menšikov, the town declares that they are not able to provide the trees and flowers requested by the Royal Highness for a "Lust-garten". Tallinn is barren; nothing grows because of the numerous rodents that have eaten the roots of all plants. This must be divine punishment to the town.
This cache is placed near the former chapel and church of St.Gertrud, the patron saint who protected fields and homes from rats and mice. In the museum-church of St.Nicholas (Niguliste) you can see a beautiful altar piece which depicts Gertrud with a mouse in front of her feet. The Gertrud's church that stood here was destroyed in 1710, and has never been restored.
Here's a fact that Üprus never noticed (or at least never mentioned): the town had been taken over by rodents just after the destruction of the St.Gertrud's church. I have no idea where the cat mummies are today, or if they still protect us, but - just in case - let there be a geocache to keep away the pests.