The cost of transportation is Sofa King high that unless they're mining diamonds on the moon, there's not much of a business case for mining in space.
As for moving terrestrial bodies to protect the earth from potential impacts, there is also great risk in inadvertently moving objects into an orbit that has a higher likelihood of impacting our home. Planetary mechanics is complicated because all of the planets exert gravitational influence on each other and all of the smaller bodies wandering around the solar system. In physics, it's called the "three body problem." When you have more than two bodies exerting gravitation influence on each other, their motion can become chaotic. A key feature of chaotic behavior is sensitivity to initial conditions, popularly known as the "butterfly effect." A tiny change in the momentum of an asteroid now can lead to an unpredictable path a thousand years from now.