Maybe in their possession it's illegal, but after you dispatch some pirates, it would be nice for us to be able to return the loot to their rightful owners.
This relates a little to some ideas I had regarding bounty-hunting; the notion of a faction certifying a Commander for that type of operation within their systems. My thought was the idea of an approved bounty-hunter who is allowed to collect some amount of foreign bounty from an otherwise-Clean vessel if a Kill Warrant scan is performed and the ruling faction trusts the Commander well enough, and I think that exactly the same idea applies also to stolen cargo.
Once one earns a specific stolen-items-reclamation certificate with a faction, one is then trusted to be handling them responsibly, and either not scanned or scanned without consequence. Frontier added some new cargo-tracking for war salvage, and I am quite sure that the same idea could be used to keep a measure of whether the Commander's certificate is being used actually to recover stolen items, or nefariously to smuggle goods from elsewhere, perhaps leading to a suspension.