i think, it has in part to do with inheritance

a girl, be she legitimate or illegitimate, usually inherits very little of her fathers estate.

if she was pretty enough, and publicly accepted/acknowledged by her father, she would have some political value, (and might be given a small, but bigger than the average poor girls) dowery. and she got the dowry before her father died (it was a sure thing!)usually.

for her, the stigma of illegitimatcy would have stung less.

but for a son, unless he was a royal bastard, and endowed with land, or money, he had no future.

he couldn't rise in the church (canon law does not permit bastards to become bishops) he couldn't rise economically (since he wasn't by law entitled to inherit any part of his fathers estate), he couldn't marry well (who wants a bastard as a SIL.)

being illegitimate had very different difficulties for men vs. women