The Holy Roman Empire had a logic to it in the Middle Ages, Andrew Roberts explains (in Napoleon: A Life), when it brought together hundreds of tiny German and central European states in a loose agglomeration for mutual trade and security, but it had grown less relevant:
On July 12, 1806 Napoleon made it yet more irrelevant when he proclaimed himself Protector of a new German entity, the Confederation of the Rhine (Rheinbund), comprising the sixteen client states allied to France, from which Austria and Prussia were notably excluded.
[…]
Under the terms of the founding of the Rhine Confederation, Napoleon now had an extra 63,000 German troops at his disposal, a number that was soon increased; indeed the term ‘French army’ becomes something of a misnomer from 1806 until the Confederation’s collapse in 1813.
[…]
Meanwhile, the Confederation fostered a nascent sense of German nationalism, and dreams that one day Germany could be an independent state ruled by Germans. There is no more powerful example of history’s law of unintended consequences than that Napoleon should have contributed to the creation of the country that was, half a century after his death, to destroy the French Empire of his own nephew, Napoleon III.