Quesion about megabytes and new camera?

So I tried asking a question using the media to show some cows in a field and it said the pic had to be under 5mb so I got to looking at all my pics from old camera and they were all 2 to 3 mb's well got to looking at pics from new camera and they were at the least 5mb's or more yet as I was looking at some of my older pics from older camera and most seemed just as defined as new camera even though the camera is about 8 years older what's the reason for the higher mb's I understand it's newer and all but what's the reason-
old camera-bulky sony dsc-h2 cybershot
new camera with crazy effects-iphone sized sony dsc wx50 cybershot

Added (1). QUESTION

The new camera probably has higher megapixels and even though you can't see it alone if you were to zoom in the new camera's pictures would be more defined and is probably the reason it takes more memory

The main reason is Marketing…

Camera makers want you to think your camera is obsolete because it does not have as many pixels as their new cameras… And they want you to but that new camera.

But if you zoom in on the photo enough, you will see the difference with the higher megapixel camera. That means the higher megapixel camera is capable of larger prints, but that is about all.

The image size depends on 1. Megapixels, 2. Jpeg setting ('Normal' or 'Fine'), and 3. The exact Jpeg storage (#bits per pixel used by the camera. This can vary.)
If you are still curious, take a look at http://www.TraitMix.com/CameraBuyersGuide.html#FileSize

Yes, the newer camera has more megapixels (MP), so it creates larger files.

As you have learned, more MP does not mean better definition, most of the time. IOW, if you just download them and look at them on a computer screen, the screen is only going to use 2MP at the most. It does make a difference if you zoom in on them or blow them up to 100% resolution or start cropping them down.

I still play with my old bulky 1.3MP Sony and the pix look just fine on my computer screen. But I also have other cameras with 12MP and I have fun cropping them down and they still look good, even if I print them, which is another story.

Newer processors in newer cameras produce pictures with higher data rates because they capture sharper detail and higher dynamic range than old cameras. New cameras are also able to record in more complex formats than jpg, like RAW and several other lossless formats