Not to defend the bankers and lawyers, but they are taxed at the income tax rate which is much more than 1.5% more than capital gains.
Also, under the new federal tax law, many lawyers are classifying their income as qualified business income so they pay much less than ordinary income. This is something that a software engineer working for a company couldn’t do.