By being politically dedicated to maintaining low levels of debt:GDP. It's easier when, as parent said, your voters remember what happens when things go really badly.
This kept German industry competitive, and enhanced exports. This overall made the euro stronger, but not as strong as the deutschmark would have been. Greece suffered from the other end: they became less competitive by being tethered to Germany's economy.