One job is not the other. Some jobs contribute – apart from the direct interest of employee and employer – to the public good. They do something for society. Some jobs certainly do not.
It was David Graeber (1961 – 2020) who coined the term bullshit jobs. In his book of the same name, he explained (anecdotally perhaps) the phenomenon of useless jobs.
Although Graeber (as a renowned anthropologist) was able to bring the subject to public attention, he could not substantiate his claims with empirical research.
This changed in 2018 when Robert Dur (Erasmus University Rotterdam) and Max van Lent (Leiden University) published a paper under the (less provocative) title: Socially Useless Jobs.
Dur and van Lent describe what more than 100,000 people in 47 countries have to say about the usefulness of their job. The insights are fascinating.