It's an alignment thing
For performance reasons you really want your storage to be aligned on all levels. While this is probably just a simple hard drive with a partition table and a file system on it directly, it's still important to not misalign it.
What about alignment?
Suppose your hard drive works with 4 kB sectors (yours appear to work with 512 bytes) and you've aligned the partition to start with just a single byte offset, then updating a single 4 kB file system page will amplify to a two-sector write on your disk. With just 4 kB becoming 8 kB, this is not a great deal, but on larger systems or RAID setups this will become a real problem once the stripe size (block size) becomes hundreds of kilobytes or even megabytes. Once misaligned on this stripe size, this could amplify an unlucky 4 kB filesystem block to a 2x block size (e.g. 2 MB) write to disks, also impacting parity calculations (if any).
SSD and other flash memory based drives are affected even worse. Usually, these drives are using huge page sizes. I've seen 512 kB "sector" sized USB flash drives out there and this is a common size for SSD drives IIRC. A misalignment when using multiple layers on top of it (e.g. dm-crypt, LVM, file system) could result in a huge write amplification (on top of what they already have) you really want to avoid unnecessary wear of the drive.
Why this gap on my drive then?
Most recent utilities just use 1 MB alignment on the disk as a safe default. It is a lowest common denominator for common set ups, avoiding most misalignments while not losing too much space.
Gaining 766 kB on 1 TB is not worth the performance impact it would impose.
Can I fix this?
Yes, you can, you'll have to look into the specification of your drive, the block size of your file system and figure out the proper alignment yourself and then fixing the partition table yourself. It's kinda dangerous to do this, though.
In your case
sda5 is probably misaligned (beginning) and I would move the
sda5 to proper alignment on an occasion that would suit me (backing up data first!).