Yes. They aren't bright snakes. In the wild they're going to ball up or try to get away. Since the snake is trapped in a tank, it has no where to escape, so it balls up.
Their defense mechanism is to ball up, hence the name "Ball Python". They ball up in fear and defense and become the perfect sitting target.