HDDs use much simpler electronics than SSDs. The controller in a hard drive mostly just moves the read/write head and spins the motor. It doesn’t need to do much processing. These chips are built on older manufacturing processes that are cheaper and less energy intensive.
SSDs though need a fast processor to manage the flash memory for wear leveling, error correction, and keeping track of where everything is written etc. This requires more advanced chips, built on newer process nodes, which take a lot more energy and resources to make.
And SSDs also need extra chips like DRAM and obviously the flash memory itself.