Yes, that's the obvious explanation.
But I spent 5.7 years homeless and was often suicidal, in part because I was homeless and things seemed hopeless, in part because I have a history of being suicidal. I had no knife, no gun, no poison. My suicidal ideation typically involved ideas like hurling myself into some nearby body of water or "playing in traffic." I was often camped near a highway and just walking out into traffic on the highway was often the most immediately available means to try to die.
I was homeless with two adult relatives who were not ever suicidal themselves. Their support is part of why I never acted on such impulses. Most homeless people are on the street alone, which means there is no one to talk to if they are suicidal and no one to try to prevent a spontaneous impulse of "I have had enough and would like to just check out of life since the entire fucking world hates me and there is no means to solve my problems."
This is part of why I say we can't really know. Homeless people often jaywalk very dangerously and it is entirely possible that one reason they do so is because they figure ending up dead would be one path out of their awful situation and bonus points for it looking like a tragic accident since suicide is stigmatizing.