Tile is smooth and glazed. Grout is rough, porous, and sits slightly lower than the tile around it. When you mop, the dirty water has to go somewhere, and it runs to the lowest point on the floor: the grout lines.
As that water dries, it leaves the soil behind. Do that every week for a few years and the grout slowly takes on the color of the mop water. Because it happens gradually, most people don't notice until they move an appliance and see what the original color was.
Scrubbing with a brush helps a little, but it's hard on the knees and it still leaves dirty water sitting on the floor. Professional tile cleaning works differently. The cleaner breaks down the buildup, and a pressurized rotary tool rinses the floor while vacuuming the water up in the same pass. The soil leaves the room instead of settling back in.
Between cleanings, a few habits help. Change the mop water more often than feels necessary, use less soap than the bottle suggests, and go over the floor once more with clean water. Soap residue is sticky, and sticky grout collects dirt faster.
