Salam
I think it is kinda funny that so many people assume that it is in a woman's nature to be a good cook. LOL! That is not a genetic code, people!
What is interesting, though, is that although women seemed to be "required" to be the cooks at home in many cultures, most of the famous cooks for royalty and heads of state throughout history have been men! Most of the militaries in many countries are all-male, so some have to learn to cook. Look at so many really famous restaurants today and famous chefs on TV - majority men!
So, I think it is more to do with the passion for food and cooking; my mom was a home-ec major and doesn't cook well (although I did learn my baking skills from her); my dad was a cook in the US National Guard and is awesome cook! My dad opened his own restaurant and loved being the chef!
Besides, all men should learn to cook at least a few good meals - when the wife is sick or incapacitated after delivering a baby, he can make a delicious meal for his family!