Barns are painted red because red paint is cheap. The paint is cheap because iron is plentiful. Iron is plentiful because it is the final element formed out of a star’s death.
Rust was plentiful on farms and because it killed fungi and mosses that might grow on barns, and it was very effective as a sealant. It turned the mixture red in color. When paint became more available, many people chose red paint for their barns in honor of tradition.