Cast iron is built for a hard sear, cornbread, and anything that likes high heat and a little fat. The dark surface is seasoning, oil baked onto the metal until it acts like a coating. That coating is tough, but three kinds of food work against it.
The first is acid. A long tomato sauce, a wine reduction, vinegar, or a heavy dose of lemon can pull at the seasoning and leave a metallic taste in the food. A quick splash at the end of a sear is usually fine. An hour of bubbling marinara is not. The pan can look dull and patchy afterward. Those dishes belong in stainless steel or an enameled pot.
The second is sugar. Sticky glazes, candy, and sauces heavy with honey or syrup bond to the iron and burn into a crust. Cast iron holds heat so well that the sugar carbonizes and can take seasoning with it when you finally scrape it free. A normal wash will not fix that.
The third is strongly scented food. Fish, smoked meat, and some pungent spices leave oils in the surface. The next pan of eggs or cornbread can taste like last night’s salmon. Dry the skillet fully, oil it lightly, and keep these three off the iron. The pan stays the tool it was meant to be.