The 2-year mortality is not the number of patients who died within 2 years divided by the number of patients included in the estimate; it also takes into account when each patient died. Taking into account the amount of follow-up time means that the estimate compares not just the proportion of patients who died within 2 years but also how quickly they died.
Consider as an example two units in which the same proportion of patients die within 2 years. In this example the unit in which patients die earlier will have a higher 2-year mortality. This standard method for estimating longer-term mortality is called ‘Survival Analysis’.