To understand why this is, you've got to go back. Way back. Back to the horrible old days of DOS and the 640 kilobyte barrier.
Back when PC users only had sixteen-bit operating systems, everybody was wrestling with the memory below the first megabyte line. That was partly because memory was expensive enough that installing whole megabytes of it was a grandiose fantasy, but it was mainly because of limitations that grew out of the cut-price IBM 8086 CPU's mere 20 memory address lines.
Two to the power of 20 bytes is one lousy megabyte. And that was the grand total memory address space available to the original PC.
A 1Mb memory limit was no big deal at the time, since only very rich people could possibly afford that much RAM, and you couldn't install more than 640 kilobytes in an early PC anyway.
The combination of the 640k maximum system memory and the one megabyte address limit, though, led to a design decision to use the memory addresses between 640 kilobytes and 1Mb as an input/output dumping ground for other hardware in the computer.
Your old PC's graphics adapter, for instance, had memory on it in which it held the data for whatever was on the screen at the time, and the computer's CPU needed to be able to read and write that memory. So each flavour of graphics adapter was assigned a portion of the 640-to-1024-kilobyte "Upper Memory Area" space as its own, and reads and writes to those addresses did stuff to the graphics adapter's memory. This process is called "memory mapped input/output", or MMIO.
This trick was all very well with computers like the original IBM PC, but when people started making PCs that could have more than 640 kilobytes of system memory, that system memory grew up into the addresses reserved for various other hardware. Now new workarounds had to be found if you wanted to find that last few kilobytes to run productivity software or games, and it all became very traumatising and hideous.
I apologise to any readers who have now remembered things that cause them to rock back and forth and mumble.
Let's fast-forward to the current era. For many years, it's been normal for personal computers to include a Memory Management Unit (MMU). MMUs were expensive add-ons for old computers, but modern CPUs all have one built in. A primary function of an MMU is to allow a computer to have "virtual memory", which in the PC world means "swapping" or "paging" data in and out of however much actual RAM you have as needed, keeping the swapped-out data in a file, or files, on hard drives.
Virtual memory is what allows your PC to have more than 4Gb of total memory, including the swap file(s). Memory management lets the computer augment its physical RAM, and lets programs running on that computer feel as if they've each got a simple solid space of memory available to them without treading on each others' toes. But virtual memory doesn't increase the amount of physical RAM you can have.
The explanation for the three-to-four-gigabyte problems is that modern computers include an arrangement conceptually similar to the old Upper Memory Area one. Many of the original Upper Memory Area MMIO reserved areas still exist today (for backward-compatibility reasons - otherwise you couldn't install DOS on a new PC), and a few more little ones sprouted above 1Mb as PCs went through their growing pains. Those are preserved today as well.
For this reason, a modern "3Gb" computer, which has 3,145,728 kilobytes of physical memory, is only likely to show something like 3,145,192 kilobytes available (look at the Performance tab in the Windows Task Manager, for instance). MMIO ranges "shadow" some of the physical memory, and so the system can't even see that RAM, at the hardware level.
3,145,728 minus 3,145,192 is only a shortfall of 536 kilobytes, though. So this 3Gb computer gives you 99.983% of the memory you paid for. Install more expansion cards in the computer, each of which is likely to eat some MMIO space for itself, and you'll lose a bit more memory. But you'll have to try pretty hard to lose even one whole megabyte.