SSDs are more expensive than HDDs mainly because flash memory is more costly to produce than magnetic disks.