I regularly give pirates what they ask - as I keep forgetting they can be around when I start mining

Always fine. Except the ones who announce they are gonna shoot first, but that is a different NPC.
My theory is:
1) OP was playing, got called away on a minor family emergency, forgot they had a jump charging
2) Jump completed while they were AFK - they faceplanted the star, as they don't know about/use SC de-throttle
3) While still AFK the pirate jumps in - asks for loot
4) OP returns after 15 seconds has expired and pirate is shooting - attempts to drop cargo, but too late - BOOM!
... is quite rage-y, knows we will snigger if they tell the truth, so they omit the AFK episode.
Fits the facts
Or we go with the OP:
1) The inexplicably faceplants a star - despite knowing enough about ship control to fill it with LTD
2) The OP notices the pirate straight away, despite at the same time overheating and trying to align with the escape vector
3) The NPC asks for loot and then opens fire without waiting - a new NPC bug yay!
Decisions decisions, what to believe