Mac turns off the power supply when it sleeps

The system is powering off because AutoPowerOff is enabled.

To disable it, issue the following command in Terminal:

sudo pmset -a autopoweroff 0

That command will set autopoweroff to "disabled" for all profiles (-a). This means it covers you when on battery and on A/C. If you just want autopoweroff disabled when on battery, use the following command:

sudo pmset -b autopoweroff 0
  • -b = battery
  • -c = (wall) charger
  • -u = UPS
  • -a = all profiles

See man pmset for more details.