This is largely because the 3.5' and 5.25' form factor names trace their lineage back to the floppy disk sizes that were used with drives that had the specific form factor. As you can see, there is no direct relationship to any external measurement. Your HDD matches this and thus is said to be a '3.5-inch form factor' drive, or just 3.5' for short. According to that table a 3.5' HDD is 146 mm long by 101.6 mm wide, or just under 5 3/4 inches by exactly 4 inches, and may be either 19 or 25.4 mm (just under 3/4 inches, or exactly 1 inch) high. Wikipedia has a list of hard disk drive form factors.
The size of an internal-bay device is given by two figures: the 'size', or form factor (usually 2.5', 3.5' or 5.25', but occasionally other values), and the height.