The spending spree to build artificial intelligence is creating a bubble, but that’s not entirely a bad thing.