France’s steel industry relied heavily on the coal-rich Ruhr Valley in Germany, while Germany's heavy industry relied on the iron ore found in the Lorraine region of France.
Because neither country could effectively produce steel or build a modern, post-war industry without the resources of the other, they decided to merge their economic and production interests. It was a forced interdependence, almost like an arranged marriage.
The agreement to dependably formalize that trade, known as the the European Coal and Steel Community (ECSC), created in 1951, evolved into the EU. As it turns out, iron and coal are not the only exports / imports that go into creating a modern economy and the trade agreement that began with these simple but essential ingredients for modernity expanded to include thousands of other products and materials.
The two world wars were devastating for France and Germany.
France in WWI lost roughly 25% of all their men aged 18–30.
Germany in WWI lost about 13% to 15% of its entire mobilized military. In WWII, the destruction of the German military was even more complete; some historical estimates show that over 30% of all German males born between 1915 and 1924 were killed or went missing.
The arrangement made for trade and interdependence hasn't just made them far more prosperous, it has made France and Germany far more able to turn young men into old men rather than corpses. The last half of the twentieth century has seemed to support the notion that greater economic interdependence has made trading partners more peaceful and prosperous.