Zend certified PHP/Magento developer

Forcefully ending ssh connection deletes content of /dev/shm [duplicate]

I was just curious if the following behaviour is intentional and if somebody could explain this behaviour to me. Enlighten me on this topic.

I used /dev/shm as a place for ram transcoding until the day I recognised that not gracefully closing an ssh connection to the host machine will cause the content of /dev/shm to be deleted.
So I can replicate deleting the content of /dev/shm when opening an ssh connection e.g. on my MacBook to that Debian Linux machine. And restarting the MacBook without exiting the ssh connection first or even closing the terminal. Just restarting the MacBook while the ssh connection is established, causes debian to get rid of the current content within /dev/shm.

I am now well aware that despite some recommendations out there that you should not dare using /dev/shm, and instead use your own tmpfs ram mount. But it got me thinking, is this intentional? What is happening there? Or is it a bug?