The royal family has a second successor to the throne, the Infanta Sofía, the younger sister of Princess Leonor, who is the first heir and who will replace the current King Felipe VI when he dies or resigns his throne. Although it is unlikely to see the Infanta on the throne, she is a great support for the next heir now and when she becomes the Queen.
Therefore, the fact that Infanta Sofía is the 2nd person in the line of succession has great importance now and will also have in the future, although many people don’t know it.
For the current monarchs of Spain, having raised two daughters with values of sisterhood and union has served to make them so close today, knowing with certainty that they will be there for each other in good and hard times. This is how important it is for Sofía to be number two in the succession, as she will be without doubt the most trusted person for Leonor and her support in her own house when she becomes the Queen.