It can also depend of how well they are compressing/optimizing their space...or if they are willing to do so. That was a particular case with games that had to go from PS2/Xbox to Gamecube or PS1 to N64...as their media had less space. RE2 on the N64 is still impressive to think of with how, despite the game being a two 700mb disc heavy game, got crammed into a 64MB cartridge with both campaigns and extra features available. It DID take a noticeable hit in the FMV quality...but they somehow got them there in the first place.
That said, game optimization seems to go hand in hand with space optimization as developers will just assume "they can handle it" nowadays with the size of drives and power of PCs today, half because of how some people are very finicky with their fidelity...and half because of how they would have to invest less if they optimized it the minimum possible.