1. Someone already has maxed out their motherboard and has some unused sticks of ram and would like to repurpose them instead of selling them or worse recycling them (remember reuse is before recycle). Reuse as battery powered storage might be an option. (This is the use case of the OP)
2. Someone wants a faux-Optane cache, maybe for the paging file/swap. Maybe to avoid wear on the SSD. Theoretically it should be possible to get higher performance than a SSD (same era RAM is faster than Optane which is faster than same era SSDs), in practice IDK. Maybe Optane is no longer available, or again maybe they already have the RAM
2. Someone wants a Volatile drive, maybe to be used in conjunction with a security oriented Linux distro like QubesOS or Tails. If a switch is tripped, everything on the computer is truly gone.
Elsewhere in the thread is a mention of gigabyte ramdisk, but what would be really interesting is a second bank you could have on a PCI card that could hold 8 sticks of RAM, and that RAM is considered lower-priority by the OS (use only if the main RAM is getting a bit constrained, or say "use this with the web browser".
But I doubt such features exist even in the Linux kernel.
Eventually at least. Ram loses its contents slowly, and temperature influences the rate it happens at, hence cold boot attacks where you can super-chill ram with some compressed air, move it out of a secured machine and into one you control, and extract in memory secrets.
2. Optane is available though, for less than a dollar per gigabyte. And if you have RAM already, you can sell it as above.
3. Encrypt it with a random in-memory key.
2. Intel abandoned Optane, so availability will be spotty
3. Encryption is not always plausibly deniable. And when it isn't, rubber hose cryptanalysis can be applied even if the key is unrecoverable. Data on a RAM drive, if it was turned off and the attacker didn't immediately freeze it (harder when they don't even know you use a RAM drive, and the case may be hard to open) should be obvious it is gone for any attacker who knows how RAM works. The point is less to protect the data and more to protect the owner from coercion through violence.
And a rubber hose can be applied to "give me the backups" no matter what you do, so I don't know how convincing that is. And if making a new key is automatic on boot I don't know if the additional risk of them not believing you is that high.
I appreciate the idea as an interesting hacker experiment but it has no practical value.
I have something myself that is in the ballpark. It's e-ink Thinkpad that has 4GB of soldered memory. It would be plenty fast if only it had more memory. They don't make a newer e-ink laptop like this. It's not SATA but if there was a way to stick a 32GB DDR4 memory stick onto an NVME drive, use it in the second slot as a pure swapfile, that would be a cool little trick to extend the lifespan of this thing.
I might try this with Optane if the prices come down more.