Uncommanded depressurization would not require a shutdown of the electrical system.
The deviation from MH370's intended course does not appear to be a random turn, it appears to be a turn toward the nearest suitable airport.