What causes them the hen ovulating two ova instead of one - either at the same exact time, or very close together in time, so that both ova get enclosed in the egg shell together.
It's like fraternal twins - some women are prone to have more than one egg ripen at a time and they release both eggs at ovulation. If both are fertilized, you end up with fraternal twins. That's why twins run in families. A mother may pass the trait to ovulate multiple eggs to her daughters.
Fraternal twins do have a strong coorelation to family history, where as identical twins do not, because the tendency to ovulate multiple eggs can be passed down genetically. Identicals are just a fluke where a single egg is fertilized, then splits at some point into two babies.
Just like in humans, some hens have a genetic predisposition to lay double yolkers. For those running commercial egg farms, the general advice is to cull those hens and not to use them for breeding, since double yolks are not desired.
For those of us with home BYCs, double yolks are just fun to get from the girls!