Dear Student,
Because moon moving around the earth with some velocity which gives centrifugal force .
This centrifugal force balances the attraction due to gravity .That is why moon do not get
stuck to earth . But if moon stops moving definately it will get stuck to earth .
Regards