The US tried to infiltrate Spanish state security. That's a direct threat to Spanish sovereignty. Imagine if they had succeeded and it led to a manipulation of Spanish policy, against the interests of the Spanish people.
What can Spain realistically do if the USA actually becomes hostile to it? The whole EU has already relinquished its full sovereignty a long time ago. The USA does as it wants and at most, the EU can expell some spies caught in the act as quietly as possible to not anger Big Uncle Sam.
There are many countries to which the US is actually hostile, and which are much weaker than Spain. Venezuela, Cuba, etc. Places like Russia and China also of course exist.
Spain could start trying to compete with the US in South America, they could push some kind of EU South America expansion, some kind of EU analogue of BRICS-for-South-America-but-not-BRICS; and of course, if it truly became a problem they could decide to go much further than that and start being actually hostile themselves, joining with the whole RIC part of the thing.
The US tried to infiltrate Spanish state security. That's a direct threat to Spanish sovereignty. Imagine if they had succeeded and it led to a manipulation of Spanish policy, against the interests of the Spanish people.
It is really something incredibly bad.