I don't agree that all starports are lawless. IMTU, every starport is different. That is the whole point- you need to be able to buy a product cheap in one spot, and then sell it for an inflated price somewhere else.
The economy. I will buy your legal guns at CR1000/dton and sell them for MCr.25/dton. Historically, that is how Aristotle Onassis made his money using demilitarized torpedo boats to smuggle cigarettes.
The incentive there is to cut out the broker. All brokers are parasites.