The cost of a SWE is nowhere close to the promotions and incentives rolled out to millions of users (imagine something simple like 5$ per user per month). SWEs are paid a lot in Bay Area but at least in top companies they are very well worth it.
These companies hire so many engineers and then have them do busy-work like building their own internal versions of Slack or new proprietary databases.
Disclaimer: I am a SWE at Uber.