mutated gene that's typically indicative that you are a recessive carrier for blonde/red hair. your dark head hair is predominately expressed, but your beard hair can show those other recessive genes. beard hair and head hair don't match in texture/quality/etc, allowing different gene expression to be seen. for most people with ginger beards, it's a mutated mc1r gene indicative of having some red hair back in your family line somewhere. you are a carrier for that gene. very common all over northern/germanic europe and celtic europe, but especially so in ireland and british isles. hair genetics is tricky, as it's not purely a dominant/recessive hierarchy. a lot of things play into it. you can have the genetics for light hair and still end up a brunette through a bunch of different interactions between various genes.
I have a ginger/blonde beard and dark brown hair. i had blondish light brown hair when I was a kid that darkened with age. there's been a lot of people with auburn hair on both sides of my family, but it's mostly been a mixed bag of dirty blondes and brunettes in my family. ginger beard is common. most the blondes become light brown with age, while looking super blonde young.