In a word, the answer to this question is Napoleon. Part of the confusion is that there were two different Hessian states when Napoleon began his massive project of reorganizing Germany in the wake of his victories against Austria and Prussia: Hesse-Kassel and Hesse-Darmstadt. Although ruled by the same family in the Revolutionary and Napoleonic period, these two German states could and did maintain separate foreign policies. The Electorate of Hesse-Kassel had the misfortune of supporting Prussia in its ill-advised war against the French. Meanwhile, the Landgraviate of Hesse-Darmstadt's leadership had shown a much more prescient political course and supported the French. Napoleon punished the last Hessian Elector William I and dissolved Hesse-Kassel so that the bulk of its territory was incorporated into the Napoleonic satellite state of the Kingdom of Westphalia. William I became dispossessed and an refugee in Denmark. The Elector's cousin, Landgrave Louis I had the opposite experience as Hesse-Darmstadt not only received further mediatized German territories as a reward for fealty to Napoleon and the Rheinbund, but an upjump in regal status. In 1806, Louis I became a Grand Duke, a more prestigious title than Landgrave.
William I returned to his patrimony in 1813, but his desire to be recognized as a separate king fell flat among the Congress of Vienna powers. Unlike his cousin and other elevated German Rheinbund princes, William I had no bargaining chips with the Allied coalition. States like Bavaria could time their defections so that they could offer their armies to make Napoleon's exit from Germany more expedient in exchange for keeping Napoleonic spoils. Louis I retained his title of Grand Duke partly for these reasons. The Allied powers were willing to restore William I to the Landgrave of Hesse-Kassel, but not elevate his status. Rather than accept this situation, William I retained the title of Elector even after there was no emperor for his dynasty to elect. Hesse-Kassel went through a downgrade in status and power in post-Napoleonic Germany and the end of the Electors was a repeat of the Napoleonic period. William I's great-grandson, Frederick William made the mistake of backing Austria in the Austro-Prussian War and the result was Prussia annexed the Electorate Hesse-Kassel and deposed Frederick William. The Grand Duchy of Hesse-Darmstadt too sided with Austria, but its diplomacy was more conciliatory than Frederick William's more strident anti-Prussian tone.