It's because after privatization the DB (Deutsche Bahn) figured out that neglecting their infrastructure until it causes a crisis, causing the government to step in and pay for repairs is much cheaper (for them) than maintaining it properly in the first place.
Seriously, fuck the DB.
But the first few people that could say that their quaterly numbers were so much better argued that their quaterly numbers were so much better! How could you argue with capitalism?
The EU says it must become that. That's why in most countries at least the infrastructure building and maintenance got separated from the company running the trains, as a first step towards privatisation. Look at Britain for how more privatisation will not offer better service for better prices.