I think courts are mostly biased in favour of the status quo which sees women as caregivers rather than biased in favour of women per se (given my own lack of desire to be a caregiver I would say this is a bias against women really). I'm not convinced by the argument that the woman having been the caregiver prior to divorce means she's the best choice for custody. The situation has changed post-divorce, and the working parent shouldn't be discounted given that they were the working parent because the other was the caregiver.There is little evidence that courts these days are biased.
But this is bearing in mind that courts are generally assessing need, not blame: a pragmatic future, not a moral judgement on the past. For instance, if the children are contested they will generally go to the parent deemed most capable of their childcare. If the woman has been the majority carer in the marriage (as is more often the case than the man), this would be taken into account as evidence that she should continue in that role and all else being equal is therefore likely to win custody. Even if she were at fault, for instance was unfaithful, the divorce needs to consider what is good for the children ahead of vindicating the man's outrage at her cheating. I think this is the sort of context where many people think the courts are unfair in divorce.
(These are my opinions as an uninformed bystander, and I might just change them later on a whim.)