Exactly my sentiments. What is the point of the constitution if one of the country's region starts disobeying and unilaterally declare independence? These are kind of disobediences which the Spanish government must fight - even if they lose.
It is not immutable, universal or objective, and if it loses the consent of a majority the social contract is broken.
The actions of the Spanish government are supported by right wing (PP), left wing (PSOE), and center wing (Ciudadanos).
People rose against, somewhere peacefully and somewhere violently, it and it is not anymore. Those countries are much better off now.
Constitutions often can be unjust, at time to time they get thrown away/re-rwitten.
We are talking about democratic constitutions, quite different from legal texts from totalitarian regimes.