What's the point of migraine

Every other pain in your body has a reason to be and they help you identify whatever problem you have going on in your body and solve it, but what is the point of migraine?
It just comes, hurts you and then leaves

This shit is so pointless it makes me so mad