Hard drive manufacturers market drives in terms of decimal (base 10) capacity. In decimal notation, one megabyte (MB) is equal to 1,000,000 bytes, one gigabyte (GB) is equal to 1,000,000,000 bytes, and one terabyte (TB) is equal to 1,000,000,000,000 bytes.
Operating systems, firmwares, and programs use the binary (base 2) numbering system. In the binary numbering system, one megabyte is equal to 1,048,576 bytes, one gigabyte is equal to 1,073,741,824 bytes, and one terabyte is equal to 1,099,511,627,776 bytes.
The difference you are seeing is the difference in these two methods for calculating the amount of storage space on drives.