It's mostly due to math...
The formatting will eat up some space but almost all memory card manufacturers equate amount of memory differently than our computers and devices do. Our computers and devices count it using binary math. Which is the exact way. In binary math there are 1024 bytes per kilobyte and 1024 kilobytes per megabyte and 1024 megabytes per gigabyte. Manufacturers just go by 1,000,000,000 bytes per Gig so a 2 GB card would be considered to have 2,000,000,000 bytes of memory on it. So, if you think of it divided by 1024 (now we're down to kb) and then 1024 again (at the MB level now) and once more by 1024 (GB finally!) it's 1.863 GB. So, in reality the formatting hardly eats up anything and it's the math that is accounting for the difference.