I have no idea what it does. I just fly around snapping it off when I can. I have yet to have anyone thank me of course. Or see anyone in chat asking for it.
For me ranking in Diplomacy was more about the transwarp to different bases. Seems to make getting around a bit easier.
Part of that might be because there is no entry in the log of who granted it to you. So if there were several other starships within the immediate area, they might not have known who granted it to them.
That doesn´t work. I got Diplomatic Immunity from another player and was attacked by a DSE 5 seconds later. :p
Are you sure you weren't headed for it, or at least very close to it? From everything I've read here on the forums, the DSEs are essentially supposed to "ignore" you and not follow you unless you go near one.