Is it fair for a new employee or an existing employee ( let's say they have been with the company 10 yrs)to make the same amount as an employee that's been with the company for almost 20 years? Different jobs but same level.
Sometimes it's fair, other times it's not, but fairness is not a business need. Life in general is often unfair. Length of tenure is only one of a number of unfair factors which vary from locale to locale, and often between industries and businesses.
Sometimes for business reasons, sometimes just on bias either cultural, institutional, or even just personal.
I would define "fair" as "paid according to the value they bring to the company" - hence if two people are doing a job at the same level, they should be paid the same.
This is much better than paying people according to their length of tenure which ends up rewarding mediocrity - new people won't find the company attractive due to the low salary, and the old people won't leave even if they are no longer a good fit due to the high salary they receive.
Compensation should be based on the value the employee brings to the company. This can be based on experience, skills, market and job functions.
If two people are doing the same job but one has more experience, it's quite possible (but not guaranteed) that the more senior employee does bring more value because of the experience.
If they have different jobs (as you indicate in the question), then that is likely much more of a factor in compensation than tenure or experience. This can even occur inverse to the levels/tenure. For example, junior software engineers probably make more than senior secretaries, because market factors have driven that salary higher.
Fairness (if it can be achieved) depends on many factors, not just tenure with the company.
Yes it's definitely fair in an economical sense..
Consider one aspect that hasn't been mentioned:
This means someone who agreed to a salaried employement 20yrs ago (including some increases over that period) and stayed within that position/pay-grade can find himself in a situation where a freshly hired, but also experienced emloyee would be making approximately the same monthly income.
And as the two answers already mentioned: market value depends on the companies pay-range, the experience of the candidates and how well the candidates sell their skill (supply/demand).
Businesses are not there to pay fair wages/salaries - apart from not having objective criteria for fairness, businesses try to get their work done for a minimum amount of money, either to maximize profit or to just be competitive.
Of course, there may be rules governing what constitutes a legally acceptable compensation (minimum wages, union agreements), and there's a market in both directions. Businesses may choose employees based on their qualifications and salary expectations, and workers may choose employers based on many criteria, including salary offered.
In existing employment relationships, there may be rules about automatic adjustment of salaries based on employment duration, and there's always place for negotiations, and of course the option to resign and change to a better-paying job if you feel treated unfairly by your employer. There's just no way to legally contest "unfair" compensation unless the employer is breaking laws or its own stated rules.
Depending on the Factors, it can be fair
At the heart of the question is whether or not the additional tenure grants the employee in regards to the employer any advantages.
Consider two jobs:
1: a Lawyer with 20 years experience. 2: a Shelf Stacker with 20 years experience.
A Lawyer with 20 years experience will have a wealth of firsthand experience in terms of cases they've dealt with, Judges and other professionals in their region that they've dealt with.
This experience has a significant added value to the employer as it likely enables the lawyer to handle cases in a more efficient manner
A Shelf Stacker on the other hand (and not throwing shade at people who work in the service industry) - there's only so much experience you need to stack a shelf efficiently.
After a period of 3-6 months there is very little in the way of value gained from additional experience to the employer
Now, in reality, a tenured employee at most companies is unlikely to have remained completely static and so may have additional institutional information that has some value to the company - such as knowing policies and procedures and being able to work autonomously or step into a 2IC role etc.
However, if that doesn't add value for the employer, then it cannot be the basis for a differential salary.
There is one final factor though that is worth bringing up - which is an employer deciding to reward loyalty with a premium salary. This is an entirely subjective factor - some employers feel strongly about employee loyalty (famously Vince McMahon and The Undertaker/Mark Calloway) whereas most are less sentimental.
Each individual is providing a value exchange with whomever they choose to work with. In the same way people can sell things online for different prices, workers can choose to offer their services for less than their colleagues.
I would suggest to change the lens from which you are viewing the interaction between a company and its employees. To focus on what is fair for the company to offer individuals working at the company most likely won't help you in the long run. The company doesn't need to consider fairness as a value metric, so to do so yourself might be lead you to worrying about something already out of your control.
I would instead focus on ensuring you are doing everything in your power to ensure you are getting compensated properly.