On the occasion of the revelation
This verse has been revealed after the battle of Badr and (according to sheikh Taher ben Ashur in his at-Tahrir wa-Tanwir) after taking the ransom for the prisoners of war, to be a future applied ruling.
Ibn Kathir here quoted the hadith of imam Ahmad saying that the prophet () asked his companions about their opinion, on what to do with the prisoners of war, where 'Omar held the opinion of killing them, while abu Bakr held the opinion of pardoning them and taking a ransom. Which apparently was the opinion the prophet () followed at the end:
Imam Ahmad recorded that Anas said, "The Prophet asked the people for their opinion about the prisoners of war of Badr, saying, (Allah has made you prevail above them.)
'Umar bin Al-Khattab stood up and said, " Allah's Messenger! Cut off their necks,"but the Prophet turned away from him. The Messenger of Allah again asked, (O people! Allah has made you prevail over them, and only yesterday, they were your brothers.)
'Omar again stood up and said, "O Allah's Messenger! Cut off their necks." The Prophet ignored him and asked the same question again and he repeated the same answer.
Abu Bakr As-Siddiq stood up and said, " Allah's Messenger! I think you should pardon them and set them free in return for ransom."
Thereupon the grief on the face of Allah's Messenger vanished. He pardoned them and accepted ransom for their release. Allah, the Exalted and Most Honored, revealed this verse,
(Were it not a previous ordainment from Allah, a severe torment would have touched you for what you took)." (source: qtafsir)
Imam al-Qurtobi -in his tafsir- was of the opinion that this verse was a blame for what the prophet () did. And he quoted also a part of a long hadith of ibn 'Abbas from sahih Muslim which quotes the same story, but adds how the Prophet () and abu Bakr received this revelation- I'll quote only the necessary parts:
When it was the day on which the Battle of Badr was fought, the Messenger of Allah (ﷺ) cast a glance at the infidels, and they were one thousand while his own Companions were three hundred and nineteen.
.
.
.
The next day when I came to the Messenger of Allah (ﷺ), I found that both he and Abu Bakr were sitting shedding tears. I said: Messenger of Allah, why are you and your Companion shedding tears? Tell me the reason. For I will weep, or I will at least pretend to weep in sympathy with you. The Messenger of Allah (ﷺ) said: I weep for what has happened to your companions for taking ransom (from the prisoners). I was shown the torture to which they were subjected. It was brought to me as close as this tree. (He pointed to a tree close to him.) Then God revealed the verse: "It is not befitting for a prophet that he should take prisoners until the force of the disbelievers has been crushed..." to the end of the verse: "so eat ye the spoils of war, (it is) lawful and pure". So Allah made booty lawful for them."
Both quoted narrations show that the Prophet () indeed decided to handle the captive topic against the advice of 'Omar ibn al-Khattab. It also showed that he had mercy with these captives who were relatives of many of the Muslim warriors. Now let's try to find out which was the mistake for which the Prophet () has been blamed in this verse:
Meaning of the verse
The translation you've posted shows that Allah say's that a Prophet who has captives should be a person who have inflicted a massacre (1st Blame), which can hardly describe the case of the battle of Badr.
It also says that such a prophet () and his surrounding ("Some Muslims") would desire the commodities of this world instead of the hereafter (2nd blame). The commodities of this live are described in verses such as:
Beautified for people is the love of that which they desire - of women and sons, heaped-up sums of gold and silver, fine branded horses, and cattle and tilled land. That is the enjoyment of worldly life, but Allah has with Him the best return. (3:14)
we could also simply call them wealth.
Indeed many of the muhajireen left Mekka and left all their wealth there and -at least right after the hijra- where depended on the hospitality of the Ansaar (people of Medina). And the ransom for the captives was certainly a kind of income for some of the Muslims.
Also note that the hadith and Qur'an allow spoils of war and ransom for captives is not unlawful per se:
So when you meet those who disbelieve [in battle], strike [their] necks until, when you have inflicted slaughter upon them, then secure their bonds, and either [confer] favor afterwards or ransom [them] until the war lays down its burdens. ... (47:4)
Ibn 'Ashur summarized the incident and explained the verse as follows (My own translation take it with care).
والمعنى أن النبيء إذا قاتل فقتاله متمحض لغاية واحدة ، هي نصر الدين ودفع أعدائه ، وليس قتاله للملك والسلطان فإذا كان أتباع الدين في قلة كان قتل الأسرى تقليلا لعدد أعداء الدين حتى إذا انتشر الدين وكثر أتباعه صلح الفداء لنفع أتباعه بالمال ، وانتفاء خشية عود العدو إلى القوة . فهذا وجه تقييد هذا الحكم بقوله : ما كان لنبيء
The meaning is that if a Prophet is fighting, then for a single and clear reason, which is to achieve the victory of the religion and to push away their enemies. His fighting is not for wealth or ascendency, so if the followers of the religion are a minority, killing captives would be a minoring of the "amount" of the enemies of the religion, but if the religion is spread and the followers have become more, then, and only in this case, taking ransom would be appropriate as the followers could benefit from the income, as there's no (big) fear that the enemy will return strong. This is why this ruling has been (initialized and) conditioned by: "It is not for a prophet" (same page as above)
Ibn 'Ashur added then that the speech is addressing the Muslims who were asked for advice not the prophet(), as he didn't do more then following Allahs orders:
... and consult them in the matter (3:159) ...
which seems also confirmed by a hadith compiled by at-Tirmidhi (see here). And one could add that a benefit of this grace or mercy can be shown, by the fact that some of these captives have accepted Islam.
Ibn 'Ashur finally concluded:
فمعنى ما كان لنبيء أن يكون له أسرى نفي اتخاذ الأسرى عن استحقاق نبيء لذلك الكون .
So the meaning of "It is not for a prophet to have captives ..." is to negate that a prophet () deserves keeping captives (which are not intended to be ransomed or freed etc.)
On the whole it is not Muhammad's mercy for these captives which has been blamed by this verse. It is in first place the fact that keeping captives was rather imprudent, as the enemy is stronger and has more followers, and to some extent the wealth matter may play a role, but certainly not the mercy.