Why does my external hard drive not stop spinning when I put my computer to sleep?

Install the WD Drive Utilities app from Western Digital.

You can then adjust the spin-down time for your USB drive and even turn off the LED if you want:

enter image description here