Plants need water and light to survive. They use the light energy to get energy from nutrients they get from the soil and water, in a process called photosynthesis. The roots will always grow to find water and food. On the earth this means downward into the ground. These types of plants are geotropic, which means that they will grow towards the source of gravity, i.e. the roots will grow downward.
Plants are also phototropic, which means they grow towards sources of light.
They have light-sensitive cells that show the plant which direction to grow in. This is why the potato shoots grew around the obstacles towards the light from the hole. If you look in any patch of soil you will probably find some worms. Worms are valuable creatures because they form a vital roll in the garden for plants and things that grow in the soil. Put a layer of dark soil into a clean goldfish bowl.