We can debate if it should or should not be ilegal, but it’s a different thing.
These actions are taken to avoid violating the constitutional order, not the vote directly. If the constitution is being infringed, you can’t make exceptions.
How would you react if a regional government (which represent 30-40% of the people there) in your country stops obeying the constitution? Would you not stop the privacy infringement that is using census data ilegally? Would you not protect the 60-70% who didn’t vote the ruling party?
The proper thing for the Spanish government to do is to sit down with the Catalans and engage in meaningful dialogue. Not kick in doors and jail people for participating in a non-binding referendum.
If you want to modify the constitution you need 2/3 of the senate. There’s a procedure for that. There no excuse to break the constitution. If you think there is, you had no argument to defend your own constitutional rights.
Spain (executive and judiciary) is choosing to ignore that (unlike Canada, for example), and not letting Catalonia exercise that right in any way. According to polls 70%/80% of Catalans think a referendum about independence should take place. The current Catalan government has the mandate from last elections to find a way for the Catalans to exercise this right even if Spain opposes, given that Spain has also refused all previous proposals to find a solution.
Catalans literally have no other option. They either waive their right to self-determination or they exercise it.
Some relevant sources:
Referendum Law: http://dogc.gencat.cat/ca/pdogc_canals_interns/pdogc_resulta...
The Legitimacy of Catalonia's Exercise of its Right to Decide (a Report by a Commission of International Experts): https://www.unige.ch/gsi/files/9115/0461/7417/EXECUTIVE_SUMM...
https://elpais.com/elpais/2014/10/10/opinion/1412946101_9911...
- Charter of the United Nations, Chapter 1 (Purposes and Principles), article 1.2: "To develop friendly relations among nations based on respect for the principle of equal rights and self-determination of peoples, and to take other appropriate measures to strengthen universal peace" [1]
- International Covenant on Economic, Social and Cultural Rights, article 1.1 (check out other points and article 2): All peoples have the right of self-determination. By virtue of that right they freely determine their political status and freely pursue their economic, social and cultural development. [2]
- International Covenant on Civil and Political Rights, article 1.1: [pretty much same text as International Covenant on Economic, Social and Cultural Rights) [3]
- Spanish Constitution, part 1 (Fundamental Rights and Duties), Section 10.2: "Provisions relating to the fundamental rights and liberties recognized by the Constitution shall be construed in conformity with the Universal Declaration of Human Rights and international treaties and agreements thereon ratified by Spain." [4]
Though you only had to check Wikipedia: "The right of people to self-determination is a cardinal principle in modern international law (commonly regarded as a jus cogens rule)" [5]
[1] http://www.un.org/en/sections/un-charter/chapter-i/index.htm...
[2] http://www.ohchr.org/EN/ProfessionalInterest/Pages/CESCR.asp...
[3] http://www.ohchr.org/EN/ProfessionalInterest/Pages/CCPR.aspx
[4] http://www.lamoncloa.gob.es/lang/en/espana/leyfundamental/Pa...
https://es.wikipedia.org/wiki/Tribunal_Superior_de_Justicia_...