SWE salaries are also very high because right now it's cheap as hell to run a software company leading to huge returns. Overheads are miniscule. The salaries can take a larger slice of the pie.
A lot of people in the comments are talking about how EE work is comparatively much harder. But that's irrelevant. SWEs simply make businesses more money.