Yes, but it's the skills you have and the things you've done in your past that are important, surely - not necessarily how long you've been in a job. I'm not knocking experience, but if you've spent, for example 30 years behind a till, full stop, you're really not any more qualified to do the job than someone who's been behind a till for five: you're unlikely to be 25 years better at handling a till.
First, see Ooperlooper's point about the pay argument. You can't have it both ways. Oh, no, you can. It's family-unfriendly not to, you see. Silly me.
Second, while you are of course right in the case you cite, it doesn't apply across the board. 3.5 years versus 7 years in a rather more demanding job isn't quite the same. And no, time-served isn't always a good measure to judge things on, but they're not saying they won't take into account time served. They're saying they must consider time spent on maternity leave as time spent on the job. Even though it really, really isn't (to the extent that every time she comes back she asks me for a year's update on developments that she'd know about if she was working). That's not quite the same, is it?
I've no tale of woe to follow on from this: she hasn't been favoured for promotion over me, there's no job liable to come up in which she might be, unless someone gets hit by a runaway P4. And if one does, and she's better at it in the view of all criteria, then fine. But please, don't pretend she's done the job for as long as me, because she hasn't.