The fibers run out of room and smash their neighbors. When the sun comes out and bakes the surface bone dry, the fibers all shrink back, but because a lot of fibers are now smaller, the surface shrinks back to a smaller size, bending the board into a cup. It bends because the other side of the board still has larger, uncompressed fibers. The technical term for this process is compression set. Microorganisms degrade the connections between wood fibers, and the wood becomes spongy.
Some species are much more prone to rot.
Species like Teak and Western Cedar are slow to rot because they have anti-microbial compounds in them that inhibit the growth of microorganisms, even when the wood has a lot of moisture. Choosing the right species for outdoor applications may mean that no finish is required, except for esthetics. Some finishes retard liquid water from moving into wood, and are good choices on rot-prone species. Chemical pre-treatment of wood is the best means of stopping rot organisms. Any wood that is immersed in water for long periods of time or frequently covered with mist is a first class candidate for rot.