The reason is no other than to make sure to dispute the Supercopa. If Real Madrid loses and Barcelona lifts the title, Alavés will be automatically ensured to be in the Spanish Super Cup against the Barça team in the middle of summer regardless of what happens in the Cup final.
Should Real Madrid be the one to take the title, Deportivo Alavés would have to win the Cup to be in the Super Cup. Otherwise, it would be Barcelona who would play a vibrant "El Clasico" in the middle of August against the eternal rival.
The "final" at La Rosaleda in the League does not just affect Real Madrid and Barcelona but it also affects Alaves.