Sounds like a weird incentivization for sure. Why not base the pension on the average over all the years worked as in many other countries? When you offer such incentives, people will naturally work in such a way.
Mind you, in the UK, defined benefits pension schemes are very rare nowadays, but where they exist they are defined as a percentage of the final year salary with that company, so the highest 2 year thing seems a bit weird to me but for a different reason.