It is simply a tradition to give the condemned a public last statement. It has foundations in transparency and giving token dignity to the condemned.
It is much preferable to disappearing people to black sites with no records.