you are missing the fact that "memory" is a very VERY general term. There are many completely different technologies used in completely different ways for completely different purposes.
RAM
Flash
SSD
HDD
NVRAM
ROM
CMOS
L1 Cache
L2 Cache
L3 Cache
Floppy
Jazz/Zip
Magneto-optical
Hybrid HDD
Optical
Holographic Media
And probably a few I have missed. Those are all "memory" in that they store 0 and 1 values for data. But they are COMPLETELY different in construction, capability, and purpose.