The problem with dirty grout is not just that it looks bad. The stains you see are only the tip of the iceberg.
First, the Bad News
Unsealed grout is very porous. Accidents happen, and liquids, for example, juice from a cutting board used for raw chicken, can penetrate into the pores of grout. Even with regular cleaning, the grout can become unsanitary.
Now, the Good News
Fortunately, tile and grout can be professionally cleaned and restored to like new, for a fraction of the cost of replacement. It can also be sealed to make it non-porous and make follow up cleaning easier.