This isn't strictly about experience; it's also about whether someone a company is going to invest time in is going to stick around for a while, or is going to hop around a lot.
But regardless, years worked, when coupled with title/promotion history, is actually a decent proxy for experience. It's not perfect, but neither is the resume itself. No one is going to make a hiring decision solely on it, but it's a signal that can be useful.