Birds are controlled by spinal motor centers.
The spinal cord evolved before the brain and initially controlled all body functions, including movement. Later, the motor centers that developed in the brain did not replace the spinal ones but were 'built on top' of them.
In birds and mammals, the spinal motor centers operate under the full control of the brain. However, if the brain is separated from the spinal cord, the spinal centers can function independently for some time. For example, a dog with its brain disconnected or separated can perform scratching movements or flex and extend all four legs when one of them is stimulated. If such a dog is placed on a treadmill (secured in a harness to prevent falling), it will perform coordinated steps. In birds, the capabilities of the 'freed' spinal cord are even more pronounced.
In humans, the activity of the spinal motor centers can manifest in the first months of life (the stepping reflex of newborns). As the higher parts of the nervous system develop, these centers become subordinate, losing the ability for autonomous activity.