Investors have applauded Amazon and Salesforce for reducing the size of their workforce