This irks me too, but what I believe it comes from MOST of the time is the lag time between server in client.
- The creature starts casting the spell on the server, it takes 1/10 to 1/4 of a second for you to find out.
- You start to hide or cast invis (taking a few more tenths of a second)
- It then takes another fraction of the second for the server to find out, plus the time to complete the hide/invis.
- by that time, the creature's/PvPer's spell has been cast on the server.
- While this information is being sent back to the client, the client completes your hide/invis.
- The Server info then hits the client a second or two after the chain of event started with #1, and the spell hits, revealing you - but to the server, you never completed the hide.
HOWEVER, there are occasions were the delay does appear to be longer than the above server/client data exchange should allow. Some of these seem to be where the creature (or even a different one) auto-reveals you and hits you with a spell they already had in motion, and you don't get the reveal message. Others, well, are just not explainable.