Chickens don't necessarily go inside when it rains--and as we've discussed, it's not because they're not smart enough. They're smart! They just know that they're outfitted with pretty durn good rain gear: water repellent feathers. Especially in light rains, water just rolls right off. (Ducks have even more effectively water repellent feathers--you may have heard the phrase "like water off a duck's back.")
If you've ever wondered how that works, your first thought was probably that when they preen, the oil from their oil gland provides a protective coating, making for water repellent feathers. But you may be surprised to learn that the uropygial gland---the oil gland---is not the reason that water rolls right off at all! It's actually the structure of the feathers themselves.
When we're looking at feather structure, we start with the shaft, which is composed of the calamus (close to the body) and the rachis (further out). The shaft is What you may think of as the central quill. If you were a wizard---are you? 'cause that would be awesome, and I have a few jobs for you, starting with World Peace---you would be writing your spells and scrolls, and I suppose even your grocery list, with a quill, where the calamus has been trimmed and dipped in ink.
Branching out from the rachis are the vanes, which is the entire structure to the sides of the shaft. The vanes are made up of the barbs, which emerge from the rachis part of the shaft, and tiny barbules that knit the barbs together. Then from the barbules, even smaller hooklets or barbicels--they keep the barbules together.
Chickens have water repellent feathers due to the contact angle between the water and the feathers at a microscopic level. The structure--the hooklets, barbules and so forth--create tiny little pockets of air, making the feathers not only water repellent but ALSO quite insulating.
This goes for most chickens breeds. Silkies, however, are lacking some of the feather structure---this is why they feel furry!---so their feathers tend to get wet earlier than other breeds's feathers do.
But the structure of the feather is so efficient at repelling water and insulating, that Gore-Tex based its water repellent fabric on the same principals.
So... what is the uropygial gland--the oil gland--used for, if not for water repellency? It does help with repellency in that it assists in keeping the feathers in condition. Chickens preen and spread the oil on their feathers for basically the same reasons you or I might use conditioner. If their feathers get dry, brittle and broken, the physical structure deteriorates, so the water can penetrate. and soak the feathers.
It's worth noting that chicken feathers are not waterproof! They are merely water resistant. They will get soaked in a long or pouring rain, despite their amazing feathers. Some other types of birds have additional adaptations that make their feathers even more water resistant (powder down, for example).
So how is this information about water repellent feathers useful to you? Okay--I admit it. It's probably not---not unless you are a, er, competitive trivia-er. But it will, hopefully, help you understand some of the reasons why your chickens may not go inside when it rains--and it may also help you understand the importance of helping your chickens maintain good feather condition. So be sure to provide them with a good, high protein diet (especially during molting, when they're growing in their new feathers for the year) and plenty of space to avoid stress, picking and wear.