The market is not inherently moral or immoral; it is amoral. It is not necessarily what ‘should’ be (an arbitrary standard of preference), but it is what is and what will be. The market is nothing more than individuals using each other to satisfy their own desires. It just so happens that in the vast majority of cases, people can satisfy their desires in ways which are mutually beneficial.
The market routes around obstacles and this includes things such as government regulations and prohibitions. As long as a demand for a good or service exists, there will be individuals willing to help supply that good or service in exchange for the satisfaction of their own demands.
Simply put, the market encompasses all human action which involves the production, distribution, consumption, or exchange of goods and services. As long as human beings have desires, there will be a market. Declaring a good or service to be illegal won’t remove it from the market so long as a demand for it exists; it will merely increase its cost (due to the risk created by prohibition) and thus the likelihood of violence associated with its existence in the market.