Humans must not only cope with death, they must also cope with chance and fickleness.
Wisdom (in the sense of ability or skill) is no guarantee of success. Time and chance cloud the outcome. While these factors could be positive, they appear to be negative here, suggesting bad times and accidents (9:12).
Qoheleth now presents an anecdote of a poor man who saved a city through his wisdom (9:13, 16). Confronted by a powerful king, this man through an act of diplomacy managed to save the city. The story demonstrates the superior of wisdom over might, but this wisdom was not rewarded. The poor man was forgotten, not immortalized. Even wisdom is vulnerable to uncertainty and does not assure success.