Jeff Bezos’ wealth slumped by more than $21 billion after Amazon.com Inc. said it planned to continue spending big on artificial intelligence even at the expense of short-term profits.