In my rewrite ideas, I had that as a "cage" for a demon sith long before Dagobah even had a name. Yoda and an ancestor of Skywalker imprisoned it inside. It dreamed of getting revenge and escape. When a young, meek, non-descript astrocartographer found the world...and the cave/cage, he accidently unleashed it and it possessed him. That young astrographer was named Palpatine. I based the demon idea on the end of ROTJ. After the Emperor explodes, this shrieking wind and dark shapes come flying out of the chasm. I know some people don't like this idea, but oh well.
This why Yoda hides there---why would the Sith demon return to someplace it had been imprisoned? It would also explain Palpatine's deteriorating appearance. The possession corrupts the body.