The result of marketing pushing base 10 numbers on an archiecture that is base 2. Fundamentally is caused by the difference of 10³ (1000) vs 2¹⁰ (1024).
Actual storage size of what you will buy is Amount = initial size * (1000/1024)^n where n is the power of 10^n for the magnitude (e.g kilo = 3, mega = 6, giga = 9, tera = 12)
its correct, the final size you see in the OS is not kilo/giga/terabytes but kibi/gibi/tebibytes. the problem is less of the drive and more of how the OS displays the value. the OS CHOOSES to display it in base 2, but drives are sold in base 10, and what is given is actually correct. Windows, being the most used one, is the most guilty of starting the trend of naming what should be kibi/gibi/tebibytes as kilo/giga/terabytes. Essentially, 2 Tera Bytes ~= 1.82 Tebibytes. many OS' display the latter but use the former naming
Base 2 based displays and calling them kilobytes date back to the 1960s. Way before the byte was standardised to be eight bits (and according to network engineers it still isn't you still see new RFCs using "octet").
Granted though harddisks seem to have been base-10 based from the very beginning, with the IBM 350 storing five million 6-bit bytes. Window's history isn't in that kind of hardware though but CP/M and DOS, and dir displayed in base 2 from the beginning (page 10):
Displays the filename and size in kilobytes (1024 bytes).
Then, speaking of operating systems with actual harddrive support: In Unix ls -lh seems to be universally base-2 based (GNU has --si to switch which I think noone ever uses). -h (and -k) are non-standard, you won't find them in POSIX (default is to print raw number of bytes, no units).