indeed. after all if you look at it, louis 5th had more right to the spanish throne than his uncle, who became king of spain. but the reason philip 5th was chosen to be king of spain was exactly the fact that no-one would have accepted louis as king of both countries.
when louis was ill as a child, his closest heir was his uncle, who was king of spain. after that i believe the line went back to the orleans family - but people assumed that philip 5th of spain would not accept that and many feared civil war.
Philip, Duc d'Anjou, was chosen to be King of Spain because he was a younger son who seemed to have little, if any, chance of inheriting the French throne: Louis XIV understood very well that no one would allow France and Spain to be ruled by the same person. After Philip (V) reluctantly left for Spain, there was a series of deaths in the French royal family. Philip had already renounced his succession rights to the French throne (and the succession rights of his descendants) in a family compact; he deeply regretted what he'd done as the death toll in the French royal family mounted. His renunciation was repeated in peace treaties that were hammered out at the end of the War of the Spanish Succession. As a result, the French succession worked as follows:
Louis XV
Orleans branch
Conde branch
Conti branch
Duc de Maine
Comte de Toulouse
Maine and Toulouse were stripped of their succession rights soon after Philippe II d’Orleans became Regent, but that did not provide much solace for Philip’s greedy and homesick heart. Philip was eager to make himself Regent at the very least, but Philippe handily smacked down his efforts in that direction. If Louis XV had died and Philip had been dumb enough to make a play for the French throne (and I believe that he was indeed dumb enough to do so), there would have been a war and he would have lost. The peace treaties that ended the W.O.T.S.S. mandated that the thrones of France and Spain must remain separate and bound everyone to see that this mandate was respected. More importantly, there was something for everyone (but Philip) to gain from a war over the French succession, i.e. capturing and divvying up the Spanish Netherlands, etc. Philip would have found himself squaring off against Philippe, the Houses of Conde and Conti, George I of Great Britain, Emperor Charles VI, the Holy Roman Empire, the Dutch, Sweden, Denmark, and the Italian rulers. Philip would have never been able to succeed against such a concentration of power.