Dairy products are made with the help of microbes. But sometimes other, undesirable ones will cause spoilage.
Butter is high in fat with not much water. This means it is slow to go off. Some bacteria, yeasts and moulds may grow and make it rancid and tainted.
Yoghurt is made when bacteria ferment milk. It is acid and can be spoiled by yeasts and moulds.
Cheese is a solidified mixture of milk protein and fats. Its typical flavours are dependent on microbial action during manufacture. The combination of salt, low water content and acidity in mature cheese mean that it keeps well and any spoilage is by yeasts and moulds.