Retrospectives are unfortunately named. The name (correctly) suggests looking back
over what has gone before, but I've noticed this leads many people to
run retrospectives after a project has finished. The other part of a retrospective
is looking forward: how can we improve in the future? What can we do differently?
What can we try?

Retrospectives after a completed project can certainly be educational, but the lessons
learnt and things to do in the future tend to be somewhat abstract and vague. Since
the project is over, you can't make immediate changes over the next couple of weeks,
so there's little motivation to come up with concrete actions. Retrospectives are about
improvement, but in this case you're often improving the vague notion of a similar project
in the future.

On the other hand, if you run a retrospective in the middle of a project, you can
try out new ideas quickly, perhaps as soon as you leave the retrospective. These ideas will
hopefully improve your working life within the next couple of weeks, rather than
affecting some vague future project. This gives a strong incentive to come up with useful,
concrete actions. If you're running regular retrospectives, you also have the opportunity to
experiment and iterate on ideas.

Retrospectives shouldn't be held at the end of a project out of a sense of obligation, or
the need to learn something from a failed project. Regular retrospectives in the middle
of a project give the best chance for real improvement.