The stock price of a company listed on a stock exchange is a reasonable estimate of what the company would be worth in the future based on future cash estimates. Future cash flows are predicted using information about the company, the state of the sector it is in and the overall condition of the economy.
The fact that a company is carrying out illegal or unethical practices is usually something that comes as a surprise. As traders and investors are not aware of this fact until the news comes in, this is immediately factored into the price of the company's stock. As these activities usually lead to losses for the company, the cash flow estimates have to be revised downwards. As a result of this, the price of the company's stock falls when it is found that illegal or unethical activities are being carried out.