One dev can spend 2 weeks automating some process or building a prototype web app that goes on to generate tens of millions for the company with no overhead.
Your hypothetical EE can spend 2 years designing a chip. The chip will then require 100s of millions of dollars to be spent on testing, manufacturing, and sales in order to be economically useful to the company (note that none of those functions involve the EE who designed the chip).
Sad? I dunno, maybe. True, yep. Nonsensical? Definitely not, there's clear logic to why certain kinds of work pay what they do.
Consider the reality shows The Voice, America's Got Talent, game shows etc., that generate millions of dollars of revenue for the studios. But the people who are performing the acts, aren't compensated highly (unless they "win").
Frankly I think that many of these highly paid SWEs are really not worth what they are paid, and that many people could be doing their jobs.
I think this is part of the reason of my struggles in the job market since being laid off in June. There has become an obsession that if you're not in the "top 1% of SDEs", you are in essence, worthless and shouldn't be hired.