I agree with you. But it seems that pain probably existed before higher reasoning (since it's a associated with the older parts of the brain), so it's a bit of a puzzle. Maybe early on the pain mechanisms existed without the associated qualia, or maybe pain also forces other control systems to be bypassed.