Just like your grocery store which has small medium large and huge bags of chips storage companies also cater to different needs. Not every customer needs the largest or smallest drive.
As a general rule smaller drives are less complex and physically smaller internally thus they are cheaper.
A small USB drive or SSD might be physically smaller than the case it is in and will use less and lower capacity chips to store data. Also many low capacity USB drives are due to a glut in the market as people upgraded to higher capacities but these drives made years ago still need to be sold off. The image below gives you an idea of what is inside a low capacity SSD vs. a high capacity one. You can see fewer chips and the PCB board is smaller than the case, this is what makes it so cheap.
Similarly, HDDs with a smaller capacity are less complex but it is often harder to tell by looking at them. Larger Hard Disks might have more drive platters, more precise movement of the drive head or might use new technologies to write thinner bands of data on the disk that you can’t really see.
Data centers such as Google, Amazon or Microsoft, that store your data, require as big of drive capacities as they can get; common home users might only need a small simple drive.