I have an area in my yard designed for the snakes to be able to climb. Myself and my employees spend a lot of hours outside with the snakes. I have several videos of ball pythons climbing to impressive heights on IG. It’s specific to the anima and some never will. Heavy bodied adults almost always won’t. Smaller adult males that are inclined to climb will continue to do it throughout life. Based on what I’ve observed it is sometimes opportunity seeking and sometimes they seem to be fleeing predation.
If that spot it’s hanging from is under the lamp it’s climbing because it’s cold.