I just assume that it's nerves are making it look alive. I am pretty confident that the snake knows what it's doing and squeezes until the pulse stops. Unfortunately, that isn't always the case but I figure it's like when a hungry human burns their mouth on hot pizza for example. We know it's gonna hurt but when hungry enough, a sacrifice must be made