To me, the word, "earth' has more than one meaning. Look at what this online etymology dictionary has to say about it:
earth (n.)
Old English eorþe "ground, soil, dirt, dry land; country, district," also used (along with middangeard) for "the (material) world, the abode of man" (as opposed to...