Historically, most pistachios in the United States were imported from the Middle East.
The problem was that when they arrived, they tended to have numerous blemishes on the shells, particularly stains left over from the harvesting methods employed in the Middle East.
These stains weren't good for marketing purposes.
To get around this, importers devised an idea to not only mask the blemishes, but also to help draw the eye to the pistachios, namely, dying them red.
This all began to change in the 1970s when pistachios started to be grown in the U.S. commercially.
Today, the vast majority (upwards of 98%) of pistachios sold in the United States are grown and processed in California with much better harvesting and processing facilities than decades before in the Middle East.
These improved facilities result in fewer blemishes and stains appearing on the pistachios, so there is less need to dye them, which is one of the reasons the practice is dying out.
Like the cashew, pistachios are a member of the Anacardiaceae family, meaning they, too, naturally contain the chemical urushiol that makes poison ivy and others in the family so irritating.
In the pistachio's case, the primary concentration of urushiol is in the pistachio itself.