In terms of gameplay this is almost certainly a holdover from David Braben's original vision of exploration data being a physical thing that could be transferred.
I think it's perhaps simpler than that - after all, the early design outlines also allowed credit transfer, and those aren't lost on death. In the original Elite, you could only save when you were docked at a station, so if you died, you went back to your previous docked station with any progress since the last docking lost.
A lot of the early Elite Dangerous design decisions seem to be attempting to keep that feel within the constraints of persistent multiplayer not exactly allowing the same save-reload cycle.
So:
- cargo, combat vouchers, exploration data will
primarily have been obtained since your last docking, so you lose them if you die
- ranks, credits, materials, ships, modules, codex data, reputations, etc. will
primarily have been obtained since long before your last docking, so you keep them if you die
This gives some inconsistencies - docking with exploration data should mean you can then sell it later even if you die, whereas getting killed in a RES should revert your combat rank gains from the things you killed in that fight - but it's easier, less exploitable, and probably clearer to players if there's a fixed rule per type, rather than the game holding a (possibly months-old) savegame of your last dock.
The problem of course is that for most professions, the time between dockings is probably an hour or so at most, whereas for exploration it can easily be weeks or months, which goes way outside the original Elite model of play.