It depends from house to house.  Generally Carpet Mfgs recommend or require every 12-18 months.  Some warranties require that you get professional cleaning within a certain time, or you void your warranty.  We say as a general rule of thumb high traffic rooms, steps & hallways benefit from yearly or twice yearly cleaning.  Such things as the number of people living in the house, kids, pets, eating habits, entertaining, all have an impact on the carpets.    Actually the more you clean properly, the better.  You will not get premature traffic lanes that are actually wear the fibers down.  You will keep it looking better for longer before replacing it.  And, actually it is healthier.  Carpet has a filtering benefit which can reduce airborne particulate, when it is clean.