They confessed after the tremendous destructive power was sent by Allah (swt) to destroy the cities and nations, who have disobeyed His (swt) orders and refused to follow the Messengers He (swt) sent to them.
They admitted that they wronged themselves rather than others. Transgressing oneself is the worst sort of injustice because it means devesting it from the eternal joy in exchange for a temporary, transient moment of pleasure in the worldly life. Allah (swt) says:
وَمَا الْحَيَاةُ الدُّنْيَا إِلَّا مَتَاعُ الْغُرُورِ
(And what is the life of this world except the enjoyment of delusion.) (Al-i-Imran: 185)