Wow, so much spy hate.
I don't think it's a terribly efficient system, but there's something in it for everyone.
1. If you are tech leader, you have more spies than your opponents, this means you can actually do MORE with the system than your opponents. So, while you may be losing tech, the system actually favors the tech leader. This is especially true because human players tend to beeline for certain techs, or just to get to the next era for city state bonuses anyway (counterbalanced by higher faith costs).
2. Do people not care what the AI is doing? Spying doesn't help the AI, they already know what you're doing, and what they don't know is in your head and so they CANT get this information. You, on the other hand, can. E.g. a AI that spies on you can never get a diplo advantage by sharing what it learns about you with another civ. You, the human player, not only CAN do this, but you can also learn things like what the civ is producing that helps you make intelligent decisions. When you are tech leader, you are usually just worried about really unexpected things happening, because otherwise, you are naturally going to win. The spy system lets you keep tabs on your opponents much easier and more effectively than otherwise (even without them actually finding out the AI's plans).
3. Are people actually complaining about city state coups? It's just about the only way AIs stay competitive with you and city states. It brings balance so you can't hold onto the entire map of city states for the entire game with minimal effort. Yeah, it's a bit random (literally, it's a random % chance), but their chance drops to close to 0 if their influence isn't high enough, so it gives more value to the patronage tree closer. Want to prevent coups? Have around 200 influence in each city state. You won't get couped. City states severely favor the human player, and at the very least this semi-corrects for the bad AI. Let's face it, you're playing above Prince difficulty because you recognize that the game is no fun unless the AI gets advantages to stay competitive, because it sucks at so many things. City state control is one of the most glaring holes in the AI's game, so anything that helps them in that regard is welcomed in my book. Coups dont' so much as screw you over, as they balance out what the AI is unable to otherwise accomplish (that a human opponent would)... in the same way the AI gets production, happiness, research, and gold bonuses. If you want a balanced system, play on prince and beg for better AI. If you've accepted that the AI needs help, then why complain about this? (this system where objectively, the AI actually gets no bonuses, but is just a structural change that makes it harder for everyone to control large #s of city states).