You’re taking this all too literally. It’s politics, it’s all a performance.
When France was “angry” about Australia buying US nuclear subs and canceling their French contract do you really think that was real?
It’s all for show, just like being “angry” at another country spying on you. You do something like “kick out their embassy employees”, then turn around and let new ones come in.
There was no need to just do this for show. Most members of the public don't care about submarine deals. It doesn't make their government more popular.
Nahh… from what I’ve read, Australia had made it abundantly clear they were pulling out of the French deal. Maybe France was pissed they were excluded, but the “angry” was entirely for show.
The public may not care about submarine deals but France certainly cares about how they are perceived on the world stage.
What alternative do you propose? Give up? Naively hope every other world leaders (all sociopaths by nature, with intelligence agencies managed by yet more sociopaths) will understand and hold up their end of a deal they don’t even know exists? This is geopolitics, you take every advantage you can get, every time, forever. Spying is how you prevent wars by avoiding misunderstandings and miscalculations.