Ah young people these days.
That today we use highly volatile dynamic Random-Access Memory is an accident; volatile RAM is relatively recent, and, I hope, will not last for much longer.
Some of the first commercially available computers used drum memory for RAM. Non-volatile.
For a relatively long time, about 20 years (from the late 1950s to mid-1970s at least, in some places much longer), computers used magnetic-core memory for RAM. Non-volatile. (Friends of UNIX-like operating systems may recall that the file containing the memory dump of a faulty program is called core
, because in those days when UNIX was born RAM was magnetic-core memory, and people used to say "core" instead of RAM, for example, to load a program into core, or to dump core.)
Then came large-scale integrated circuits and static semiconductor RAM. Static RAM is only slowly volatile, and it is faster than the highly volatile dynamic RAM which dominates today; unfortunately, it is also more expensive, requiring 6 transistors per bit instead of one transistor and one capacitor.
Coming up to the question, non-volatile static RAM (nvSRAM) is used in some aerospace, automotive, medical etc. applications where non-volatility is important. Non-volatile SRAM enhances the inherent characteristic of SRAM to be only slowly volatile to guarantee that data is kept intact when power is lost. (The more usual solution is to use battery-backed-up SRAM, BBSRAM, which is cheaper than nvSRAM; the energy consumption when not in operation is tiny, so a battery-backed-up SRAM can survive a long time, but it is slower than nvSRAM.)
And then there is flash memory. How on earth a civilization can develop very large scale integrated (VLSI) circuits but somehow miss developing flash is incomprehensible, because flash is the current step in a chain which began with factory-programmed Read-Only Memory (ROM) "as old as the semiconductor technology itself" (Wikipedia), continuing through programmable read-only memory (PROM) which could be written once, through erasable read-only memory (EPROM) which could be erased and rewritten many times but required exposure to ultraviolet light in order to be erased (some of us may remember the EPROM chips with quartz windows), through electrically-erasable read-only memory (EEPROM) which joy of joys could be erased under program control, and culminating with the NOR and NAND flash cells we use today.
The access speed of modern SSDs is improving fast, and the density of other non-volatile RAM technonologies is also improving. Some large computer manufacturers are exploring several ways of making non-volatile RAM large enough, fast enough and cheap enough to do away with the current paradigm and return to the ideal of single-level store computers.
TL;DR: Non-volatile memory is older than volatile RAM, and chances are that the domination of highly volatile dynamic will come to an end in the not too distant future.