The latest layoffs at Hello Sunshine, People Inc., Dropbox, and Front reveal why companies are cutting jobs even as they invest in growth.