I’ve got bad news for you if you think the average lawyer makes more.
Unlike the normal distribution in your link, earnings in the legal profession follow a bimodal distribution. The mean/median earnings of everyone from public defenders and law firm associates isn't typically representative of actual incomes.
As does software development. What are the chances that he ends up in the FAANG equivalent in law?