As a result of the many wars opposing the two kingdoms in the Middle-Ages and the Renaissance, most probably.
If it was only Catalonia, maybe through an extreme twist of the Spanish Civil War, with a French government ready to confront the Nationalists over Catalonia, and Catalans seeing joining France as a better alternative than life under a Fascist regime ?
But Aragon... It's key to the Spanish nation, just like Castilla. So French possession of it would probably come from armed conflict - or an odd twist of succession amongst the Bourbons.
Yes, definitely the fortunes of war. And I know just the ticket.
We open the Chronicles of Ramon Muntaner, link to the page here:
...let me take you back to times of yore...
August, 1283, on the day of Our Lady Saint Mary, on the way to Besalu, the King of Aragon accompanied by 200 Almogavars was ambushed by 400 French knights led by the Count of Nivers.
"... and thus the King turned, and saw that knight that had killed Guilermo Escriva, and gave him such a blow with his morningstar on his helmet that he made his brain come out of his ears..."
Say what you want about his domestic policies, but Peter the Great of Aragon has got skills.
"...and fell down dead by the same place where the Count laid dead... he saw his people in such a bind, he ran over the enemy host, and did such a job that he killed of his own hand more than fifteen knights. Those he reached, he brought down with single blows..."
Peter the Great of Aragon, action hero. This must be why kings wave. Practice for the morningstar.
"And in that action, a French knight saw the King doing so much damage and sword in hand he came and cut the reins on the King's horse."
There you have the POD. We'll go back to it after knowing what happened in OTL...
"And truly the King could have lost his life there. Since no knight should go to an armed fight with less than two sets of reins, some of chain, others of leather, and those of chain covered in leather."
(I love Muntaner there: you're my King, you're made of win, but entering battle like that was DUMB, your Majesty)
"What shall I say? That the King was thus marooned and the horse took him here and there, and four Almogavers who had the King close came by and tied his reins together again. And the King kept this knight who had cut his reins in his thoughts, went there where he was and repaid him the pleasure he had done, and made sure he did not have to cut any reins ever again... "
I could have been briefer, but this happens to be one of my favourite books...
Let's have the four knights be a little more busy at that point, and the king dead. In the resulting chaos, the French advance and we get Charles de Valois crowned as King of Aragon. Dynastic rights staying the same, at the death of Philippe the Beautiful (don't think the death of Philippe the Daring is much moved back by a victory there) we might get France and Aragon in personal union.
How long would that last? Well, not sure, but that could butterfly off the Knights Templar having the book thrown at them so that the French king could get his hands on their cash...
Thoughts?