Answer:
Food habits, predators.
Explanation:
The biggest reasons are food habits and predators, most birds who nest on the ground either can't fly or use this to be closer to their food. A ground bird (Like quail) can fly but choose to be more ground-based birds.
Most of the time it's because these birds forage for food like ground insects, seeds from the brush that grows on the ground, or fallen fruit.
Most birds that live in the trees feast on seeds, leaves, or insects found close to where they choose to nest. They may also want to escape any predators that may be towards the ground.