Hm, interesting question. Limited for time at the moment so I’ll briefly give the Islamic viewpoint. Its not dissimilar to the Christian doctrine as it is a continuation of the teachings of the previous Prophets (pbut). The earth serves many purposes for its inhabitants of course, but in terms of what it is for Mankind, is that it is a temporary dwelling place providing us with the necessary provisions to prove our worth. It is a testing ground to achieve the main purpose of Man's life. To realise his Creator and worship Him by following the guidance He has given us to reach our final abode, an eternal life.
The Earth was here before the creation of man and had other inhabitants. The Jinn and animals for one, who are still inhabitants of the earth. However, man was made the authority on the earth.
“And surely, We gave you authority on the earth and appointed for you therein provisions (for your life). Little thanks do you give.” (ch7:v10)
“And no (moving) living creature is there on earth but its provision is due from Allah. And He knows its dwelling place and its deposit (in the uterus, grave, etc.). all is in a Clear Book” (Ch11:v6)
“On earth will be a dwelling-place for you and an enjoyment, - for a time.” (Ch7:v24)
“But when He delivered them, behold! They rebel (disobey Allah) in the earth wrongfully. O mankind! Your rebellion (disobedience to Allah) is only against your ownselves, - a brief enjoyment of this worldly life, then (in the end) unto Us is your return, and We shall inform you that which you used to do.” (ch10:v23)
The earth will not last forever, it is only subject to a particular time, and when the command is given, it will be no more. Then when the command is given again, all in the earth will be resurrected for judgement.
“Do they not think deeply (in their ownselves) about themselves (how Allah created them from nothing, and similarly He will resurrect them)? Allah has created not the heavens and the earth, and all that is between them, except with truth and for an appointed term. And indeed many of mankind deny the Meeting with their Lord.” (Ch30:v8)
“He brings out the living from the dead, and brings out the dead from the living. And He revives the earth after its death. And thus shall you be brought out (resurrected).” (ch30:19)
“Those who remember Allah (always, and in prayers) standing, sitting, and lying down on their sides, and think deeply about the creation of the heavens and the earth, (saying): "Our Lord! You have not created (all) this without purpose, glory to You! (Exalted be You above all that they associate with You as partners). Give us salvation from the torment of the Fire.” (ch3:191)