Law school is a human capital investment, worth making (roughly speaking) if the benefits are higher than the costs.
Male lawyers earn, on average, more than female lawyers (e.g. here). But that does not mean they get a higher return on their legal education. The pay-off to going to law school is the increase in earnings relative to the next best alternative. If the next best alternative is serving ice-cream, then law school may still be a worthwhile investment, even if it does not guarantee a six figure salary.