إِنَّ اللَّهَ يُحِبُّ الَّذِينَ يُقَاتِلُونَ فِي سَبِيلِهِ صَفًّا
Verily, Allah loves those who fight in His cause in rows,
Allah stated what He likes, and they were tested on the day of Uhud.
However, they retreated and fled, leaving the Prophet behind. It was about their case that Allah revealed this Ayah;
يَا أَيُّهَا الَّذِينَ اَمَنُوا لِمَ تَقُولُونَ مَا لَاا تَفْعَلُونَ
O you who believe! Why do you say that which you do not do
Allah says here, `The dearest of you to Me, is he who fights in My cause."'
Some said that it was revealed about the gravity of fighting in battle, when one says that he fought and endured the battle, even though he did not do so.
Qatadah and Ad-Dahhak said that this Ayah was sent down to admonish some people who used to say that they killed, fought, stabbed, and did such and such during battle, even though they did not do any of it.
Sa`id bin Jubayr said about Allah's statement,
إِنَّ اللَّهَ يُحِبُّ الَّذِينَ يُقَاتِلُونَ فِي سَبِيلِهِ صَفًّا
(Verily, Allah loves those who fight in His cause in rows (ranks)),
"Before Allah's Messenger began the battle against the enemy, he liked to line up his forces in rows; in this Surah, Allah teaches the believers to do the same."
He also said that Allah's statement,
كَأَنَّهُم بُنيَانٌ مَّرْصُوصٌ
as if they were a solid structure.
means, its parts are firmly connected to each other; in rows for battle.
Muqatil bin Hayyan said,
"Firmly connected to each other."
Ibn `Abbas commented on the meaning of the Ayah,
كَأَنَّهُم بُنيَانٌ مَّرْصُوصٌ
(as if they were a solid structure). by saying,
"They are like a firm structure that does not move, because its parts are cemented to each other.