The elephant in the room is that people with some mental illnesses can become erratic and violent. Someone above pointed out that cops are meant to "threaten and deliver violence." I think this is a vast simplification, but even under those criteria you can see why cops might be dispatched to deal with people who are mentally ill.
None of that is to say we shouldn't have other options, just that there are valid reasons to involve cops in some of these situations.
None of that is to say we shouldn't have other options, just that there are valid reasons to involve cops in some of these situations.