If you were not to commit sins, Allah would have swept you out of existence and would have replaced you by another people who have committed sin, and then asked forgiveness from Allah, and He would have granted them pardon.
عَنْ رَسُولِ اللَّهِ ﷺ أَنَّهُ قَالَ لَوْ أَنَّكُمْ لَمْ تَكُنْ لَكُمْ ذُنُوبٌ يَغْفِرُهَا اللَّهُ لَكُمْ لَجَاءَ اللَّهُ بِقَوْمٍ لَهُمْ ذُنُوبٌ يَغْفِرُهَا لَهُمْ