Why do I sometimes get such painful period cramps?

Dysmenorrhea. It is related to your periods and you can take some thing for it, like Motrin or naprosyn, (naproxen) but do discuss with your gynecologist if it is ok.