Why wouldn't the moon be affected enough by Earth's gravity to be in orbit?
To find Earth's sphere of influence use the equation SMA*(massofearth/massofsun)^.4. That's 149,598,261*(1,989,100/5.9736)^.4 = 924,609 km, and the moon is at most 400,000 km away from the Earth at apogee, well within the SOI. (Note: SMA is in km and masses in 10^24 kg).
The SOI is influenced by the masses of the two bodies and the distance of the smaller body (Earth) determines how far out its gravity will be the biggest affect. At the edge of the Earth's SOI the gravitational pull from the sun is equal to that of Earth, which happens to be farther out than the moon (of course). Well, the SOI isn't a perfect sphere since the sun's gravitational pull 925,000 km on the opposite side of Earth is less than 925,000 km on the near side so it is 'lopsided' I guess you could put it.