Extractive staining occurs when moisture inside the redwood and cedar siding dissolves and then natural chemicals (extractives) release.  They will mostly be dark in color and the moisture will seep into the paint and infiltrate into the paint film.  When the water is then dried a stain will form.  Location and elimination of these moisture sources along with quality priming products to the siding boards before installation is the best prevention method.