The moon isn't design for some purpose - scientists believe it was formed along when the earth was forming - 4.57 billion years ago - probably the result of a collision of another body smacking into the newly formed earth - and solidifying as a sphere in synchronous orbit around the earth. There are other theories - but this theory has evidence to support it - materials from the moon dug up by astronauts and brought back to earth are also the same materials found on earth - the moon appears to be made from the newborn earth. Many planets we've observed also have moons - some with several moons.
Without our moon which is just the right size and just the right distance from the earth, life as we know it would not be possible. Science has a lot of theory's but thats all they are theory's, mankind would rather swallow preposterous theory's rather than have a hope for something better.