That sounds like it is useful for training flying skills.
"Perhaps ground fighting is a useful skill"
If you are chased by birds of prey, I guess any advantage you have in flying is useful. When birds chase them through thick forests, they do have to fly upside down some of the time.
But very likely the bird does not think, "oh I need to train". No, they just have fun doing it. Like kids have fun wrestling. "Fun" is the motivator to do the right thing evolution wise. Our human problem with "fun" is just that we have other metrics for sucess, that are not that fun anymore.