Block Inc. cuts 40% workforce under Jack Dorsey, shifting to AI, boosting shares despite fintech sector strain and risks.