When a man turns to Allah in repentance, he is fulfilling Allah's wish, as well as a part of the reason for his creation. Repentance then becomes an act of righteousness and worship greatly pleasing to Allah.