[Machine] The prayer is ordained as two units, except for Maghrib prayer which is ordained as three units, because it is the Witr prayer. The Messenger of Allah ﷺ used to pray the initial prayer (when traveling) as two units, except for Maghrib prayer, and when he stayed, he would add two units to each unit except for Maghrib prayer, because it is the Witr prayer, and Fajr prayer because he would prolong the recitation in it.
فُرِضَتِ الصَّلَاةُ رَكْعَتَيْنِ رَكْعَتَيْنِ إِلَّا الْمَغْرِبَ فُرِضَتْ ثَلَاثًا لِأَنَّهَا وِتْرٌ قَالَتْ وَكَانَ رَسُولُ اللهِ ﷺ إِذَا سَافَرَ صَلَّى الصَّلَاةَ الْأُولَى إِلَّا الْمَغْرِبَ فَإِذَا أَقَامَ زَادَ مَعَ كُلِّ رَكْعَتَيْنِ رَكْعَتَيْنِ إِلَّا الْمَغْرِبَ لِأَنَّهَا وَتْرٌ وَالصُّبْحَ لِأَنَّهُ يُطَوِّلُ فِيهَا الْقِرَاءَةَ