Until recently, tech bosses who invested their company’s money too freely could expect to be punished by investors. Not so in the age of AI. Last year, $1trn was spent on AI hardware and software.