government has THREE branches: administrative, legislative, and judicial. They are ALL part of the GOVERNMENT, just handling different matters concerning their country.
In this case, it was one branch of their government, namely the third judicial branch, which overused and abused its power, overstepped the boundary, and thence interfered with the country's diplomatic matters, of which belongs to the jurisdiction of the administrative branch, by the judicial branch's own legal leverage. It was the other two branches, initiated by the administrative, cooperated by the legislative, to purposefully remedied and corrected the third branch's wrongdoings. However, it was still a matter of Spain's government correcting its own wrongs. So you appreciate Spain administration's and legislature's own reflection, augmented with their own initiatives to correct their own wrongs. But you DON'T thank Spain government for their own initial preposterous wrongs.
Friendly on the part of Spain? Not really. Certainly not at the beginning. It's only after the Spain government had realized what serious consequences they were going to face down the road, and only then they quickly tried to remedy their own big mess up. They just desperately need China's capital and investments now to keep their heads above the water at this juncture. If it's not the serious consequences behind China's protest, you can be sure that they won't budge a bit!
Don't mix the country and its people with its government. You don't retaliate or sanction Spain as a country or punish its people. But you certainly retaliate or sanction its government for its preposterous wrongs if they don't correct and apologize expeditiously, even if this wrong was done by just one branch of the government. So far, you haven't heard any apologies, right? That indicates they don't think they are wrong concerning prosecution. They are just being practical and play smart right now.
So the conclusion is that you don't thank Spain government's efforts of correcting and remedying its own preposterous wrongs, even after they've done so in the end. It's just because you are NOT GUILTY on this issue all along. China can just put things behind now and move on from here, while closely monitor their future behavior.