But gravity may be useful in many applications. We don’t really know how to effectively manufacture many things in microgravity at the moment. The moon would still be important for early space infrastructure.
Edit: In addition, the moon will be useful for mining and resource extraction for a long time, most likely, due to its proximity to earth and size.