When choosing between projects we always (in the exam) choose the one with the higher NPV. However it can be the case that the one with the highest NPV has a lower IRR.
Consider this extreme example:
Suppose project A lasts for only one year and gives a return of 10% per year. Project B lasts for 20 years and gives a return of 9% per year. The cost of capital is 5%.
If you were investing your money then you would prefer B, unless it was the case that the returns from A could be reinvested to as to always earn 10% for ever.