Late 2013 Macbook Pro turns off at random times
try booting into safe mode and test out the machine and see if it powers off. To boot into safe mode, hold down the Shift key when you power it on. Test it and see if it happens again. If not, it could be a third-party application or extension.