If i am not mistakes the file size can be affected by allot of things. But the main one i think you are looking at is the "Quality" output. The pixel dimensions can be the same in 2 different photos but the quality can be turned way down in one causing the lower file size. Like when you are saving something out of Photoshop as a jpg and theirs the Quality option.. if you turn that down it will make the file size smaller by removing what it thinks are "unneeded" pixels in the images lowering the viewing/print quality but it will remain at the same pixel dimensions.
Unless you are referring to the Raw images, then i do not believe what i have said applies.
This is how i understand it works. All tho i have been miss guided before.