There are a lot of potential explanations. In essence they built a model to categorize brain features into male and female, and then tested this against their label of male or female on each brain. So this could result from problems with the model predictions—or just as easily from their “correct” labeling of each brain as male or female.
So a big question is how did they define male and female? By genetics? By reproductive anatomy? By self reported identity? This information was not in the article. All of these things are very likely correlated with things happening in the brain, but probably not perfectly. It’s worth noting that many definitions of sex do not consider gender identity at all—if such a definition was used, then a trans-man might be labeled female in their data, whether they have reckoned with their identity or not.
Because moral values don’t come from religious texts. They are transmitted socially and economically. The texts are then used to justify whatever belief system the believer subscribes to.
The real origin of these right-wing beliefs is an interesting question. They arise from a complex cultural and historical process that stems from the material conditions of both ancestral and present-day cultural groupings. My suspicion is that they arose because in these societies, the most successful reproductive and political strategies center around dominance hierarchies. Materially successful people are able to out-compete, out-reproduce, kill, or otherwise coerce people in their societies to adopt values and norms that justify and protect their social dominance and oppression. Even those on the bottom of these hierarchies, like women or the poor must adopt such values or be excluded or attacked.
There are also competing groups that either oppose such hierarchies or have adopted them to a lesser extent. It is from these groups that many Christian ideas originated. In general they tend to originate in urban areas—I suspect this is because there are more opportunities for people to escape from others who wish to dominate them as compared to agrarian societies where access to land or livestock can be monopolized by the powerful. Anonymity and cultural diversity in cities also allow the weak to more easily inflict violence on their dominators without suffering social consequences.
But over time, Christianity spread widely enough that people with different values adopted them. In other cases, the descendants of these anti-hierarchical Christians adopted hierarchical values for various reasons listed above. As the economic and political conditions of society change, people must adapt or die. Unfortunately, some of these adaptations can be harmful to society as a whole even as they benefit their adopters.