To get rid of something according to OALD means to make oneself free of someone or something that is annoying. One can get rid of old useless things by throwing them away or of bad habits.
There is also a verb to rid. etymonline has to rid, ca. 1200, meaning to clear (a space), to set free, to save. A connection is drawn to a verb in Old Norse that means to clear land of obstructions, old variants of Germanic languages are given, but modern German Land roden meaning to prepare a field or a path by eliminating trees is lacking.
According to the dictionary the expression to get rid of something is younger, dated around 1660. My view is that rid in to get rid of something is connected with the verb free and the form freed, past participle or adjective which we also have in modern German befreit.
One may imagine that a form like rid can develop from freed by dropping f and shortening the vowel.
I would not connect the expression to get rid of something with the idea of clearing land as in German roden, I think a connection with freed is much more plausible. But I think the derivations of the two word families free and to clear land (as in German roden) have become so similar that in English a separation is very difficult.
Question: What is more probable, the idea of clearing land or a connection with freed?