I ran the numbers and I don't think it's as amazing as you describe:
From what I could quickly find online (correct me if I'm wrong), the theoretical maximum pension you can get today is 3034 EUR/month, starting from the age of 67. With current life expectancy you're going to enjoy it for only about 15 years on average. To get it, you need to work for 45 years straight earning at least 82800 EUR each year and paying whopping 18.6% of that (incl. employer part) for the privilege to be part of this amazing system.
Let's look at net present value as of retirement age of both sides of the equation:
for r in [1.07, 1.05, 1.012]: # discount factor
for y in [15, 30]: # years to live
print('%.3f %d %.0f %.0f' % (r, y,
sum(82800*0.186*r**i for i in range(45)),
sum(3034*12/r**i for i in range(y))))
#discount factor, years to live, NPV contributions, NPV payout
1.070 15 4400768 354813
1.070 30 4400768 483414
1.050 15 2459510 396798
1.050 30 2459510 587664
1.012 15 911856 503038
1.012 30 911856 923662
No matter how you slice it, the answer seems to be the same: you pay way more into the system than you get out of it. Only under rather unrealistic assumptions that you can't get more than ca. 1% investment return for 45 years(!) and you're going to live till almost your 100th birthday(!) do you approach a break-even point