They’re not intentionally targeting the mentally ill to sell them guns so they can perform crimes with them.
What’s happening is this mentally ill person was searching things, the algorithm caught on and sent them advertisements to persuade them to purchase more of the things he was looking at.
The algorithm doesn’t really care what it is as long as it qualifies in whatever marketing parameters they have.
Did the algorithm persuade or affect the person’s actions and promoted the crimes that they committed. Probably not. Do these predatory marketing firms have some kind of accountability? They probably do.