If you steal the Coca Cola recipe and release it, don't you think you'd be acting illegally? These documents were stolen from law firms, trust managers and accounting firms.
Aside from the fact that many of these structures are not illegal, and are often declared to local tax authorities of the resident, these are private matters. Plenty of money is laundered through onshore jurisdictions as well -- this has nothing to do with the entities itself.