I've had this happen rarely since stock, so I think it's a game bug. Usually it appears to be a ship that you sunk previously that spawns back in your contact zone. Seems to happen more if you use saves.
Just remember Captains often didn't get credit for ships sunk...no one believes you. Actually it would be a good idea if it wasn't a bug.