Software companies have beautiful margins. Their incremental cost is practically zero, their biggest expense is headcount for R&D, etc.
Non-software companies have to deal with gross things like inventory, lead times, logistics, shipping, RMA, etc etc... You know, the dirty details of not having the luxury of literally just selling information/bits.
Software companies great margins mean that employees can capture a larger share of that (because they create so much value). Lower-margin businesses can't, so the pay isn't as good.