If you stop someone flying a pirate ship (Pirate Transport, Pirate Train, properly-IDed Border Worlds Transport), ask where they're going first. If they say one of your bases, "offer" to "escort" them - by which I of course mean follow closely and make sure he doesn't divert from his stated course.
Same if they have a Smuggler ID. A Pirate ID on a transport is unusual, though, especially when it's not actually being used for piracy.
It'll save a lot of frustration, and does actually make a bit more sense if you stop to think about it.
EDIT: That said, I do not disagree with you shooting the guy. He had it coming.