That is, take an economist's view of the world in which people borrow money to make investments in 'human capital' aka 'law school.' They make that decision based on expected future returns on that investment (increased future salary stream). Even if there's only a small amount of bias against women in the system (not making that claim, just saying 'even if'), such that for a given amount of investment and effort a woman's compensation will be lower than that for an equivalent male, this means that fewer women will find it worthwhile to go to law school, and those women who do will subsequently have an incentive to not work as hard because the returns on their efforts will be lower.
The world is more complicated than this, of course, and the above should not be read as saying "women lawyers don't try as hard." But to some degree people respond to incentives, and if you're going to have to work 25% harder than the guy next to you to achieve the same compensation you might say fuck it and spend your time in other ways.