It's not. The title is ambiguous. You're used to read headlines in a "headline tone" and you know/assume the meaning because you internalised the fact that magnesium is not bad for you, which is correct. If someone knows perfect English, but doesn't take that fact as axiomatic, the title is ambiguous.