For better or worse, Nintendo has always done things their own way. The Nintendo 64 is a good example. In an era when multimedia was king and CD-ROM was not only the wave of the future but had been well established, Nintendo decided to stick with cartridges for one more console generation. This is a little surprising given that Nintendo had worked with both Phillips and Sony to develop a CD-ROM add-on for the Super Nintendo (the latter famously leading to the development of the PlayStation). However, at the end of the day, Nintendo felt that CD-ROM just did not have the performance characteristics they desired.
The cartridge format has its advantages and disadvantages. The big advantage of course is speed. Accessing game data from solid state memory is far faster than reading it off of a CD. This meant virtually no load times. The disadvantages are price and memory limitations. While a CD costs pennies, ROM cartridges were far more expensive. A single CD could hold 650 to 700 MB whereas Nintendo 64 cartridges were limited to 64 MB primarily for cost reasons. These limitations led to there being only 388 games released for the N64 during its lifetime. By comparison there were around 1,100 games released for the PlayStation and close to 600 for the Sega Saturn. Both the NES and SNES had well over 700 games. However, despite the lower game count, the N64 still outsold the Saturn in the U.S. and the expense of producing cartridges meant that developers had to be much more careful with what they released, something that Nintendo tended to enforce to one degree or another over the years anyway. The average game quality was much higher on the N64 than other systems and a number of very influential games came from that system, including Mario 64, The Legend of Zelda: Ocarina of Time, GoldenEye 007 and a number of others. Ironically, Nintendo has come full circle by eliminating optical media and supporting a ROM cartridge format on the Switch (though digital distribution is also supported).