I think the ending of Chinatown is about coping with grief - and really summarises the moral struggles of Jake throughout the movie, leading us to an evaluation of guilt and self-forgiveness. Polanski actually changed the original ending to the film, which was initially going to be a happy ending, with Evelyn escaping and Jake dying, however Polanski insisted on the change.
It's hard to tell exactly why Polanski made this change, however, with reference to his wife's murder in 1969, a viewer can begin to appreciate the hopelessness of Jake's statement and the bleak ending of the film. Polanski said that his absence on the night of his wife's murder was the biggest regret of his life - Jake's regret for the unnamed woman who died in Chinatown is similar.
We can't always help what happens in our lives, and it frustrates and torments us when someone we love is hurt - we blame ourselves. By consoling ourselves that its Chinatown we accept that we don't control our lives, even if we want to, and that's ok.
However, Jake's consolation could also be construed as a critique of justice and futility, with Walsh forming a sort of Senecan prototype of fortune and immorality/injustice. Either way it is one of my favourite movie quotes!