The Moon orbits the Earth primarily due to the gravitational influence of the Earth, despite the Sun's greater gravitational force acting on it. The concept of mechanical energy is crucial in understanding this relationship; if the total mechanical energy is negative, the Moon remains in a bound orbit around the Earth. The Hill sphere defines the region where the Earth's gravitational influence dominates, allowing the Moon to stay in orbit. Angular momentum plays a role, but the Moon's orbit is more accurately described by its gravitational sphere of influence. Ultimately, both the Earth and Moon orbit the Sun, but the Moon's proximity to the Earth allows it to maintain its orbit around our planet.