You have to remember that the EU's immediate precursor was initially specifically set up to ensure that France and Germany would not enter into another war against each other.
Also, even a strong economy like Germany has its economic voice much amplified by negotiating on the world stage as a member of the EU trade bloc. As Fizz noted, a unified 447M+ market handily beats a national market.
The Greek debt crisis is also less black and white than seems at first glance. While there were no doubt calls to noble ideals like European unity motivating assistance, it is also true that both German and French bankers had hefty exposures to risky loans to Greece.
So, rather than just the French and German taxpayers bailing out Greece out of kindness you could also say that French and German banks roped European taxpayers in general to rescue them for their unduly greedy and risk-unaware lending decisions (Greek government bonds at some point had only 0.25% extra interest compared to German debt).
The bailout was also driven not just by Greece being an EU country, but an Euro-using one. There was concern on the impact on the Euro which would have hurt the France and Germany. For Germany and more so France, using an EU-wide currency has certain advantages on the world stage over a national currency.
But, yes, there ought to be a little more pushback against fixing problems that member states deliberately get themselves into. Countries like the Netherlands, and previously the UK, are usually more vocal in putting dampers on picking up tabs. Germany sometimes feels guilty about doing so out of historical reasons, something Greek politicians made no bones about exploiting when criticizing Germany.