The straightening of the rows is amongst those obligatory and good things which make your As-Salat (the prayer) a correct and perfect one.
حَدَّثَنَا أَبُو الْوَلِيدِ، قَالَ حَدَّثَنَا شُعْبَةُ، عَنْ قَتَادَةَ، عَنْ أَنَسٍ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " سَوُّوا صُفُوفَكُمْ فَإِنَّ تَسْوِيَةَ الصُّفُوفِ مِنْ إِقَامَةِ الصَّلاَةِ ".
Narrated Anas bin Malik: The Prophet (ﷺ) said, "Straighten your rows as the straightening of rows is essential for a perfect and correct prayer. "