This is something that I discovered by accident, but it can be logically explained.
My car of nearly 19 years has finally been taken off the road. As I had no photos of it (or any previous vehicle I had owned--the sort of thing you take for granted), I took it up to a nice spot for several photos.
The size of the file on the camera was 5.5MB. After blotting out the rego plate for privacy purposes on FaceBook, the saved file was only 2.2MB.
Therefore, if you have a good selection of large photo files, you simply need to open the file and edit just one pixel. When you re-save the file it will be significantly smaller.
When your camera is taking photos, it is using a very limited hardware-based codec which, particularly on a higher-end camera, is aimed at speed rather than extreme compression.
When you load the file into your computer software editor, re-saving the file means that the software codec is aimed at better compression, and with more memory available is able to perform tighter compression than the quickie-job done by your camera.
I imagine that users of PhotoShop or similar would be able to get better compression and even smaller files without obvious loss of quality.
The original photo-file of the ever-illustrious Deborah Harry was 5.98 MB. After opening it in Paint, and editing an almost black pixel to a real black pixel, and saving, the size was only 1.05 MB. To protect copyrights this has been scaled down even further, so the file size of the uploaded image is, of course, much smaller again.