Doctors have an extra 4 years of very expensive school plus an extra 3-7 years of training. Lawyers have an extra 3 years of very expensive school and only make about 15% more on average than software developers. Accountants make on average about 30% less than software developers.
So, take 'professional occupations' with a grain of salt. There are high-paying occupations that don't require a 4-year college degree.