Macworld
Hard disk drives (HDDs) work by spinning their internal platters. Only while spinning can data be read or written. It’s been decades since they gained the ability to remain online but not spinning in a standby state. This reduces power and can also reduce wear and tear produced by heat output and mechanical usage.
macOS automatically sends a signal to internal HDDs (on older Macs) and external ones that tell them to spin down after a period during which there has been no access to data stored on them.