I have a brother with red hair. I also have a son with red hair. Once upon a time, my beard and mustache contained many red hairs among the dominant browns. If you've ever wondered how these gingers appear all over the place, Petra Haak-Bloem offers a good explanation (although it needs some editing: how many different ways can they spell pheomelanin?).
The shade of hair color is determined by the amount of melanin, or pigment, in the hair. Your DNA not only encodes what kind of pigment you have, but also how much of it. “For white people the shades are dependent on two sorts of melanin: eumelanine (black pigment) and pheomelanine (red pigment). Hair cells of dark haired people only contain eumelanine. Blondes have less eumelanine. And redheads’ hair contains mostly pheomelanine,” Haak-Bloem says.
“More than a decade ago, researchers discovered that one gene (MC1R) on chromosome 16 plays an important part in giving people red hair. MC1R’s task is making a protein called melanocortin 1. That proteine plays an important part in converting pheolmelanine into eumelanine,” Haak-Bloem tells me. “When someone inherits two mutated versions of the MC1R-gene (one from each parent), less pheomelanine is converted into eumelanine. The feomelanine accumulates in the pigment cells and the person ends up with red hair and fair skin.”
The unexpectedly red beard is the effect of the same mutation in the MC1R gene. When you only have one mutated MC1R, red hair can appear in (unwanted) places. But even Haak-Bloem wasn’t completely sure of the mechanism. Having a deviant red beard has never been linked to any deadly diseases, so it’s pretty low on the research priorities list.
That's basically it, although it is sad that she has to admit that research on this stuff has a low priority. It shouldn't! Maybe the specific question of why people have red hair isn't a big deal, but it touches on concepts that basic biology education often neglects.
One thing has to be made clear in a world where everyone expects the answer to be something like inheritance of a gene for red hair. There is no single gene for eumelanin or pheomelanin! The pigments are the product of a biochemical pathway, and there are multiple enzymes that manage each step. Both pigments are synthesized from the amino acid tyrosine via divergent pathways.
The other important idea here is that gene expression is regulated, not just at the genetic level, but cytoplasmically. All your cells have the enzymes for making pheomelanin and eumelanin and are genetically identical, but the balance shifts in different tissues, so people with brown hair (lots of eumelanin) will express lots of pheomelanin (reddish!) in the skin of their lips and nipples.
Hair pigmentation is actually a cool subject to study. We know it's evolutionarily significant in many species (for example, Hoekstra's work on coat color variation), and it's also a visible marker for variations in gene regulation. What is the basis for male pattern baldness? Why is my beard going gray so much more quickly than my head hair? Specifically, these aren't particularly pressing concerns, but they are indicative of a lot of invisible patterning going on in our skins, made manifest by aging or illness…and it makes me curious to understand these subtle variations.