Her voice is raspy because she recorded it while she was bulimic. She has talked about going back to record it when she was recovering and decided it sounded more impactful this way and kept the original.
Demi's voice was raspy because she recorded it after throwing up constantly. She was severely bulimic. The song is directed against her personal demons, her self-harm, her bulimia, her drug use, etc.