Noticed it couple days ago.
Sometimes, when you sell a commodity, one of your guns gets sold too. Then you undock, look into your guns list - and are all like "hey, where is my Heavy Mortar???"
Not sure if it works with all types of commodities, or only specific ones - but seems to work with pirate/lane hacker/corsair pilots.
There is NO problem that can`t be solved by the use of high explosives.