As a preface, I have to confess only a layman's understanding of mediaeval history. I apologise if this question has an obvious answer, or if I've polluted the framing of it with any factual errors.
As I understand it, as part of her marriage to Louis, it was stipulated that her lands would not pass over to her husband until she gave him a male heir (which she never did) or passed away. But why did Louis' family agree to such an arrangement? Was it common? I'm having difficulty consolidating it with the popular (and perhaps wildly inaccurate) notion that the period was one in which it was difficult for a woman to come into power, and even more difficult to hold onto it.
On that note, how was Eleanor able to ascend to the position of Duchess of Aquitaine suo jure to begin with? I'm admittedly not a big mediaeval history buff, but generally speaking couldn't women only inherit if there were no eligible male heirs ahead of them (agnatic-cognatic primogeniture)? Did Eleanor's father William X have no eligible male relatives to pass his lands onto? I know that his only son died young, but I'm assuming there would be a brother or cousin somewhere in the line who would possess some kind of claim. Or did Aquitaine have different succession laws from its neighbours at the time? How did Eleanor's contemporaries view her unique position?
Here's another aspect of assumed medieval history we can demolish: primogeniture. Or rather, during the 12th century there was no consistent 'law' or 'tradition' for this across all of what we would now call modern France. It was at this point in France's history, at best, a social production of tradition, common where cultures were shared. Let me be direct: there was no single 'law' in the high middle ages anywhere in Europe.
So, now we turn to Aquitaine in particular. Aquitaine was closer to southern Occitan culture than northern French culture up through the early 13th century, and this included different traditions of inheritance. Inheritance tended towards (non exclusively) even distribution of property among sons and daughters, regardless of gender. Some historians like to paint the Occitan world in modern terms, turning it into a proto-egalitarian model - this is a falsity. But we have plenty of evidence and examples of some of the differences during this century in the Occitan lands; Eleanor of Aquitaine was not alone as a strong, female inheritor: Ermengard of Narbonne was a contemporary ^1 , or you could go back a few generations to Constance of Provence. In the next century, the inheritance of the counts of Toulouse fell to Joan, Countess of Toulouse who married into the Capetians following the Treaty of Paris, this joining the eastern Occitan lands to the French kings creating what is now by-and-large the southern borders of the modern French hexagon.
The stories of Joan and Ermengard should now put to rest any preconceptions we have of inheritance during these centuries in Occitania, but one look at the land distribution at this time and the proliferation of minor poor nobility tells us that things were different in the south before consolidation into the Capet kingdoms ^2.
Moreover, the inheritance of Eleanor, Ermengard and Joan were all governed by wills: all of these women were willed their lands and privileges by their fathers; and those same wills stipulated the marriages into the Capetian line. And in fact, and perhaps most importantly for your question, the strength of these duchies and counties were such that they met or overwhelmed those of the French king, and the Capets were not in a position to call the terms for further marriages until the mid 13th century.
Your question is a good one, for it allows us to see the middle ages in greater diversity than is often portrayed.
^1. Cheyette, Fredric L. Ermengard of Narbonne and the World of the Troubadours (Cornell University Press, 2001)
^2. Archibald Lewis. Development of Southern French and Catalan Society, 718-1050 (University of Texas, 1964)