A Husqvarna riding mower may shut off when the PTO is engaged due to various reasons such as a misaligned grass box, loose wiring, or a faulty seat switch. Additionally, a clogged carburetor or a weak battery/charging system can also cause the engine to stall. Make sure all safety switches are working correctly and check for any fuel or wiring issues.