Tech companies are pouring billions into AI chips and data centers. Increasingly, they are relying on debt and risky tactics.