In a software engineer. My cousin is an electrical engineer working at a large power distribution firm. For all intents and purposes his job is absolutely critical to society. I basically fumble around and do a few projects for my clients. I get paid several times more than him. I am happy for myself but it makes no sense to me how society is mispricing our work.
Mechanical engineers are similarly low-paid. Some time back I hired a few MechE's (with advanced degrees) to write simulation code for a startup. I paid them what I thought was fair for a Bay Area coding role, which turned out to be a significant amount more than the same job would have paid if they had a different title (they would have been doing substantially the same work at Honda/John Deere/Ford/Boeing/Lockheed/…
The 'fair' pay in the Bay area is sustained/inflated by the vast amounts of VC money with a _huge_ appetite for risk. I am not saying this is necessarily a bad thing, but it is absolutely unique, you just don't have those finance conditions anywhere else in the world, bar maybe New York.
Also all the quoted companies in your comment will have physical goods with way way smaller profit margins compared to most Bay area products.
My point is that it is not strange at all if you follow the money.