# The Role of Fungi in Food Production and Processing
## 2 Understanding the Research Prospects
### Mycotoxins and Food Safety
#### 2.5.8 Why Fungi Produce Mycotoxins  
Fungi produce mycotoxins for several reasons, although the exact motivations are not entirely understood. The following are some key theories and factors. Defense Mechanism: Mycotoxins may serve as a defense mechanism to protect the fungi from other microorganisms, such as bacteria, viruses, and competing fungi [140]. By producing toxic compounds, fungi can inhibit the growth of these potential threats and secure their own survival and ecological niche. Competition: In the competitive environment of soil and decaying organic matter, mycotoxins may provide a competitive advantage by suppressing the growth of other organisms vying for the same resources [141]. This can help fungi outcompete other microbes and establish dominance in a particular ecological niche. Regulation of Fungal Growth: Some mycotoxins might play a role in the regulation of the fungi's own growth and development. They can act as signaling molecules or influence the fungal lifecycle, including spore formation and germination [142]. Secondary Metabolism: Mycotoxins are secondary metabolites, which means they are not directly involved in the primary growth, development, or reproduction of the fungi. The production of secondary metabolites, including mycotoxins, can be a by-product of the fungi's metabolic processes [143]. 2.5.9. Solutions for Fungal Toxins  
Owing to the negative consequences of mycotoxins, a number of methods have been developed both to stop mycotoxicing fungus from growing and to clean up contaminated food and animal feed. These tactics include the following:  
* Prevention from mycotoxin contamination  
Mycotoxin contamination can occur at various stages of the food production process: in the field area before harvest, during harvesting, or during the storage and processing of the food. Hence, methods to prevent mycotoxin contamination can be categorized into pre-harvest, harvesting, and post-harvest strategies. However, preventing mycotoxin contamination before or after harvest is not always feasible, necessitating decontamination before using such materials for food and feed purposes. In recent years, more and more techniques have been developed to prevent the growth of fungi in food during storage and processing, such as the fortification of foods with vitamin C and the use of microwave-assisted thermal sterilization system [144]. Also, mature sterilization techniques such as ultra-high-temperature instantaneous sterilization (UHT), high hydrostatic pressure sterilization (HHP), ultrasound sterilization, cold plasma sterilization, and irradiation sterilization (IS) have very good results in food processing, preventing the growth of fungi in a very effective way [145]. * Detoxification of mycotoxins present in food and feed  
A number of detoxifying procedures are essential for limiting exposure to mycotoxins' harmful and cancer-causing properties. Usually, detoxification entails the physical, chemical, or biological removal of contaminated goods or the inactivation of any toxins contained in these goods. Nevertheless, the European Union forbids the use of chemical detoxification processes and the mixing of tainted goods with high-quality ones. The Food and Agriculture Organization (FAO) states that the following requirements must be met by any decontamination method that aims to lessen the harmful and financial impact of mycotoxins: mycotoxins need to be eliminated, inactivated, or destroyed. It cannot cause harmful, cancer-causing, or mutagenic residues to form in the finished goods or in food items derived from animals given clean feed. The product's attractive physical and sensory qualities should not be negatively impacted. Under ideal circumstances, it must be able to eliminate fungus spores and mycelium in order to stop the production of mycotoxin. Both economically and technically, it must be possible.