Of course Germany didn't do this because they love charity. But it is meant to be mutually beneficial: German banks get their money, Greece can stay in the Euro and can get further loans. It's not great for Greece, but the alternatives aren't much better.