Optimism doesn't necessarily mean hope. It can mean belief in an afterlife. An end to a suffering. Or gratitude for having someone else in a terrible moment.
I think OP is correct. You can't have good without optimism. Your point, which is also correct, is you can do good without hope.
op·ti·mism (noun): hopefulness and confidence about the future or the successful outcome of something.
I suspect answers couched in terms of individualism will always sound inadequate to questions that are inherently collectivist, such as why people do things "for the greater good" detrimental to their own well-being.