@laureth it wasn’t a whim. Early societies were female dominated therefore their deities (good ones) were female. A few thousand years ago, male dominance displaced female based societies. Males are characteristically aggressive and restrictive so were their gods. I suspect the early Jewish religion was formed during the transition. That’s why lineage is traced through the female but the god is male, aggressive, and demands blood sacrifices.
Picking gods and religious are probably a whim based on a strong leader. All religions are used to form a tribal unity. This was and is useful in places that still depend on tribes for safety, Afghanistan, for example but is a detriment to modern society.
The “sex” of your god depends on the dominant sex of your tribe. If, like me, you no longer have a tribe, the sex and the god are irrelevant and possibly detrimental to advanced societies.