Let me answer another component: where the initial energy for their movement came from.
Imagine two bodies separated by a large distance. In this case, the gravitational pull is small and the gravitational potential is low. Their relative velocities are just about zero. For all intensiveintents and purposes, our energy accounting is zeroed out. KE=0 GE=0 (kinetic and gravitational).
This isn't a bad description of the cloud of gases from which our solar system formed. True, the atoms which will later make up the planets and sun were mixed and dispersed, but the above statements about kinetic and gravitational energy still roughly applied.
The energy needed to start an orbit then came from putting gravitational potential into the negatives. This is why gravitational potential is GE=-G m1 m2 / r. We had zero energy to start with, and we end with gravitational potential energy being -2 units.
Why 2? Because closing of the distance between the bodies liberated energy which went equally into 2 different places. One is kinetic, which is currently manifested as such in the orbit, the other is frictional losses. This went to heat things up, and then was radiated into space. I'll call this thermal energy liberated from the gravitational change TE.
Beginning state:
$$ GE + KE + TE = 0 \\ 0 + 0 + 0 = 0 $$
Final State:
$$ GE + KE + TE = 0 \\ -2 + 1 + 1 = 0 $$
Total energy is constant, satisfying conservation of energy.