They CAN hear airborne sounds, actually, they're just not as sensitive to it as we are.
http://jeb.biologists.org/content/54/2/349.short
http://jeb.biologists.org/content/205/19/3087.full
As a couple of examples. Just because ball pythons in particular have not been studied does not mean they can't hear sound. They also perceive it differently; again, since they haven't been studied in particular, who's to say they don't use their head in some way to perceive sound?
I was merely offering it as one of many possibilities, not saying that for sure is why the snake is moving its head.
-Jen