It is very hard to know for sure what the main reason for this is. It is certainly not overt discrimination. If it is unconscious discrimination, or discrimination that is never actually stated, we would have no way of actually determining that this was the case. Therefore, we can only conjecture about the most likely causes. Perhaps the most likely cause is a set of attitudes and rules that have been created that, intentionally or not, favor men.
There are at least two ways that this works. One way is that jobs that are seen as traditionally female have also tended to be lower paid. This may be because people unconsciously believe that work that women do is worth less. For this reason, things like childcare are paid less well than “men’s jobs” that require similar levels of education and training. Another way that this works is through the creation of expectations that work against women. In law firms and big companies, there is often the expectation that people will prove their dedication by working late, by being available to work at any time, and by never taking time off of work. Women can be penalized if they take time off to have children. They can be penalized if they are sometimes unavailable to work because they have to (because of societal expectations) take their children to the doctor or perform other tasks related to family and children.
These are not examples of overt or even conscious discrimination, but they do act as the main cause of the disparity in pay between men and women.