Because children. My wife and I split the fourteen months of paternity leave between us and believe me, that stuff is rough. I can tell you from that experience, staying at home for a few months and then working while taking care of a small child changes your view on things and the view that others have of you. For one, you grow up to the point where you're not willing to accept all of the BS that work throws at you. Another thing is that you have "nothing to show" for a prolonged period of time and continue to underperform due to stress and lack of sleep.
Add to that the additional issues that women have due to the bodily changes they go through and you have a serious incentive to avoid hiring women. This is of course made worse by the implicit assumption that women usually do all the taking care of children, thus becoming even worse "performers" after having them.
On a side note: I was incredibly lucky to have a supportive employer that gave me the space necessary to take care of a child without getting completely derailed at work.
You're now contradicting your assertion of "IF EVERYTHING IS THE SAME". Clearly everything isn't the same if one person is likely to start working 45+ hours per week when having a child(provider/father) and the other person is more likely to start working part-time when having a child(care-taker/mother). Over-time has an opportunity cost attached to it.
So you have an explanation why women earn less (which you believe - not sure if that is the correct one), but you still believe in discrimination? How does that add up?
Because the situation in its totality is discriminating. On one hand, society expects women to take care of children. On the other hand, taking care of children is a heavy broadside against ones career.
And please don't use the biology excuse. In Slovenia and Poland, the pay gap is much less than in Germany[1], probably due to a different child care culture.
The perverse thing about this is that many young women believe that their chances are the same as ours (you know, now that we have equal rights and everything). In reality, they are not treated as our equals.
On a side note: A woman gets paid less even if she will never have children. This is discrimination.
Well personally (as a dad) I am not convinced that society expects women to take care of children, as a "special burden". Rather, I suspect it is actually a privilege. Yes, women are usually expected to do that, but it is also that they have the choice because they have the higher claim for it. Try speculating on becoming a stay at home dad as a man. They exist, but it is hardly something you can count on doing from birth onwards. For women this is still possible. You are probably from an academic background so you don't take into account that many women actually still plan on taking that route, which accounts for a lot of the pay gap (because for example they don't even try to take a high paying career).
If you think about "women having to take care of the children" you also probably think about them missing out on fulfilling fancy careers as journalists, advertisers, scientists and what not. The reality is that most women making that "sacrifice" of their career choose taking care of their children instead of working at the checkout of the supermarket or as a sales person in a fashion store.
Personally I can't think of that many professions that are really better than taking care of your own children. Not saying people shouldn't have free choice in that, but frankly I think women already do have that choice. If you are a female software developer, for example, people will be falling over themselves to hire you.
The whole "wage" comparison is just ideology anyway, they picked one arbitrary thing to measure which makes women look to be victims. If you measured "time spent with family" instead, you'd find a "time spent with family gap" for men - I think that's serious, given that many people work so they can afford to take holidays together with their families. And women are not the poorer for it, because they actually all earn exactly the same as their husbands, at least in Germany: income is split 50:50 between married partners. Curiously, that latter fact is also never mentioned in the wage gap articles.
As for your link, I briefly looked at it and immediately it is clear that they use the dishonest pay gap number. It is 22% in Germany only if you don't take into account different career choices. Within equal professions the pay gap is only 4 to 8% (even less in office jobs). Therefore I am sorry but I can't take that article seriously.
Another article was mentioned in this discussion which showed single childless mothers to earn more than their male counterparts in cities at least.
Edit: another thing, you are also a dad, so you probably witnessed pregnancy and birth. Do you really think it should be the normal thing for women to exclaim "OK, that's done, where is my job please? I want to get back to work" right afterwards? As I said, everybody should have free choice, but on average I think it would be weird to dismiss something you invested so much energy into (pregnancy/childbirth/breast feeding...). It's not that women shouldn't have a choice (as long as the kids are OK), but I am not surprised that many choose to spend as much time with their kids as possible.
Edit 2: Slovakia and Poland could have lots of reason for different wage gaps. Perhaps they are still on communist wage levels where everybody earns the same (next to nothing). Or career choices are not as diverse (ie most people could be peasants or whatever). Another fun part of wage comparisons: one person, like Bill Gates, can actually earn so much more than other persons that they skew the whole statistics (if you use averages). So perhaps there are simply some very rich men in Germany and not in Poland. Or whatver - it is all just guessing, just as you did. In any case, as I said, that article didn't use honest statistics anyway.
Add to that the additional issues that women have due to the bodily changes they go through and you have a serious incentive to avoid hiring women. This is of course made worse by the implicit assumption that women usually do all the taking care of children, thus becoming even worse "performers" after having them.
On a side note: I was incredibly lucky to have a supportive employer that gave me the space necessary to take care of a child without getting completely derailed at work.