For one thing we are required as a precept of the Church to confess once a year, so if someone rocks up saying ‘it’s been three years’ the priest can advise them on the precept.
For another - someone who hasn’t confessed for a year is going, most likely, to have a lot longer confession than someone who last went a week or a fortnight ago - lets the priest know what he’s in for. Or if someone is making their first confession, again that’s a different thing that the priest should know about.
For a third - let’s say someone last confessed a week ago and confesses having committed sin ‘x’ 10 times in that week - well, that’s a very different thing from confessing six months ago and having committed the same sin ‘x’ 10 times during that six months, no? Different attitude to the sin, and doubtless different advice and treatment in the confessional.
For a fourth - someone who feels compelled to confess every other day as a regular thing (and priests get to know their ‘regulars’) might be suffering a really bad case of scruples. True, Mother Teresa and John Paul II, I think, went every few days, so it’s not a given that someone who does so is scrupulous, but it means the priest needs to watch out for it.