It's quite simple really - you're paying for knowledge and experience. That might not count for much if you're stacking shelves (it might take a week to train someone else to do that job), but in a skilled job knowledge counts for a lot (you might be facing several months down time if they left).
Tenure is no guarantee of performance or knowledge in any job, pay raises or bonuses should be based on performance, not tenure. If the experienced staff are better, they will earn more anyway under that system.