The rotation of the Earth drags the tidal bulges ahead of the Earth-moon line (exaggerated here).  The gravitational attraction of these masses of water does not pull directly toward the Earthıs center but rather pulls the moon slightly forward in its orbit (green arrow), forcing its orbit to grow larger-conservation of angular momentum.  The Earth also despins, spins down.