It has very little to do with incidentals like benefits, vacation time, etc, and is mostly a question of the huge difference in the productivity of labor of software engineers employed by companies that pay well and companies that don't. FAANG (and similar companies) derive a huge amount of value from each software engineer, which puts a much higher ceiling on how much they can afford to pay them before it stops making sense to hire them at all. And the reason they _do_ end up at a much higher number is because they're competing for a limited # of engineers that pass their bar.
Companies which don't get massive scale on the software they write (and therefore derive much less value from "write once, sell many times") pay correspondingly less.