Spain, as a united country, is a recent thing. The people of Aaragonians, Bosques, Castillians, and Catalans were small kingdoms, once. Even Portugal has been united and divided through various marriages and squabbles over the centuries.
I'm, by no means, an expert, but the people of Catalunya have their own culture and language. There are also several towns in northern Italy that speak Catalan, though I don't know what the connection is. Under Franco, the Catalan people were not allowed to speak their language outside the home, and newborn children couldn't have Catalan names. They did participate and sign the constitution after Franco's death, though.
I know two Catalans. One is against separation, although she would like to see less control from the central government. She also said separatists are the minority by far, but they had control of the local government. The recent "illegal vote" put a lot of non-separatists in a no-win situation. If they voted, it would be against the law, and they could get into trouble. If they stayed home, their vote wouldn't be counted.
It's a very complicated social and political situation.