Since they are incapable of determining the maximum effect of their dollar (at least, not without intense effort), they simply make the choice that feels the best, and that will usually be determined by the proximity of the suffering.
Secondly, many people invest in cancer research because everyone might get cancer. They aren't hoping to reduce suffering generally. They are thinking "I or my friends might get cancer and collectively this research might save my (or my friends) life."
Nobody cares about the suffering of people they've ever met. I mean, intellectually we all do, but emotionally, no, you have to see the person (or at least talk/text with them) to care.
As depressing as it is, your "average" human being is not making any decisions based on a rational estimation of the best way to achieve their goals. If they have goals at all. They pretty much just try to muddle through.