One of a few reasons I have no respect for Spain. The Spanish people and government seem to have an imperialist attitude
Its more complicated than that.
Catalonia was an equal partner in exploiting the Spanish empire. Spain was actually assembled peacefully through a union of crowns, including what is now Catalonia.
Spain also historically gave Catalonia and other manufacturing regions a protected market, etc. So until quite recently, and barring a couple of episodes from the late 17th-early 18th centuries, there wasn’t much nationalism there, not even during the Civil war of 1936. The Basques have always been more nationalist and separatist, they took the opportunity of 1936 to try for outright independence and some kept up a terrorist\guerilla war for decades.
Catalonia was not like that.
What’s new now is modern economic facts. If there were general prosperity in Spain, as there has been for many decades, one would not have Catalan separatism.