It’s certainly interesting to see architecture from different parts of the world. When this OP was traveling in Spain, they noticed that many places in the Spanish countryside had these small raised rooms. Naturally, they wondered what its purpose was. Well, this is a typical granary built in wood or stone and it’s quite commonly seen in Northern Portugal, Galicia, and Asturias.
They are raised by pillars ending in flat stones so that pesky rodents can’t get to the grain. The walls have slits which allow for ventilation. There are different styles and shapes of horreos all over this part of the world, the longest one being 115 feet!