Facebook is not doing this on purpose. Facebook is allowing communication about this, which of course provides a purpose and actually mostly helps prevent people from carrying this out.
They are not leading people to problematic posts on purpose - however, from what we know, I think we can reasonably assume they are tuning the recommender to maximize engagement - which leads to more problematic and controversial posts be recommended.
I think you'll find in the psychiatry literature that if there's one thing that can help a lot AGAINST suicide, it's engagement. As long as you keep the patient engaged, there is little danger of suicide (with the significant exception of a patient that came in determined to commit suicide and is executing a plan). Which is why I'm saying that even when keeping people engaged with strategies for suicide, that still works against suicide.
Of course engagement is expensive to do for humans and therefore is often explicitly not done in clinical settings, or to put it differently: hospitals are surprisingly empty for patients staying there and psychiatric hospitals are no different
Because you effectively can't do it with humans, preventing the "slide towards suicide", engagement, even discussing the suicide itself, is actually helpful.
A very recurring element in descriptions of suicide tends to be a long history of the patient with constantly dropping reaction/interaction/engagement and slowly increasing "somberness", suicidal thoughts and discussions, then suicide attempts. Then, days or sometimes less before the actual suicide you see a sudden enormous spike in engagement with staff, and while we obviously can't ask, it seems deliberately designed to mislead. And staff often "falls for it". That spike is designed to make staff give the patient the means for suicide or somehow prevent them from responding to it, or getting them information (essentially when they're not looking for some reason, such as watch change meeting)
When push comes to shove, once enough will to commit suicide exists, nothing even remotely reasonable will prevent the suicide. So knowledge about suicide mechanics seems to me much less destructive than people obviously think.
Therefore, knowledge about suicide doesn't matter much. People see it as being obviously associated and assume. Knowledge of suicide is not what causes suicides. It is therefore not "dangerous knowledge".