Microsoft laid off 40 employees in Washington state, adding to job cuts this year. Despite strong finances, the company invests heavily in AI, with $30 billion planned by 2025.