Those averages include things like medical school for doctors and law school for lawyers. Tuition and expected salary are more aligned there.
Where tuition and salary are not aligned are fields like the humanities and social sciences. At top graduate schools for those fields you will have tuitions in the hundreds of thousands of dollars, with average salary expectations far below that.
The only way that it makes financial sense to get a degree like that is if you are independently wealthy to begin with, but these schools will not tell you that and will cheerfully direct you to take on a ruinous amount of debt.