Why is it okay to eat blue cheese, but not other things that are moldy?
Just like with bacteria, mold is a very broad term. Some mold is good for you, like penicillin, some mold is bad for you.
Just like how the bacteria on yogurt is good for you, but the bacteria in spoiled milk is bad for you.
Almost all fungus produce various types of mycotoxins, mushroom poisons. They do this because it’s their way of defending themselves from bacteria.
Funnily enough not all mushroom poisons are effective against humans. Humans are quite resistant to a lot of different toxins, like those in chocolate, onions, tea etc etc. Some of the stuff that’s very bad for some of our best friends like cats and dogs. The varieties of Penicillin for example, the mushroom poison in blue cheese, is straight up lethal to guinea pigs. But not to humans, although some have allergic reactions.
It all depends on the capabilities of our livers, the organ that’s primarily responsible for breaking down toxins in our body, and exactly how our cells function inside. Allergic reactions depend on how the immune system identifies threats. Every animal is slightly different in that regard, and some can eat stuff that we would consider poisonous, and to some our every day foods are pure death.
Just as some fruit is good to eat, some is poisonous. We can grow molds that are good for us just as we grow berries and mushrooms that are good for us. We do this carefully, with special equipment, so that the molds we grow in cheeses and yogurt and other similar products, and we are careful to keep everything clean so that we only grow the mold we want.
Blue cheese is made by taking a bit wheel of cheese (various sorts) and sticking a very long syringe full of the specially made (cultured) mold (made liquidy) into the cheese. They squeeze the syringe and pull it out (retract it), so the mold is dispersed within the protein an fat of the cheese. This is done again (repeated) so that the cheese is riddled with mold.
Then, the mold is left to grow inside the cheese. When it is ready (time depends on cheese type) the cheese is cut and people eat it.
Different species of mold have make different byproducts as they grow, and not all of them are harmful. Through experience we know some that are safe, like those used in making cheese. (Yeast is also a fungus, but not a mold, and is used for baking and brewing.) When food around the house gets moldy from whatever spores were in the air, it’s a bad bet: there’s a big risk that whatever mold it is either is generally poisonous or might produce something you’re allergic to.
This why cleanliness is actually very important when working with mold. Get the wrong kind of fungus in your product and it will ruin the whole batch.