The expedition of Abu Ubaidah ibn al-Jarrah to the tribe of Juhaynah, which was part of the Quraysh, who were the arch-enemy of the Muslims. These people persecuted, and killed many Muslims, and continued to do so.
Some have said that the aim of Ubaydah was to raid a caravan. This is an unsubstantiated claim. All the historical sources say is that they were sent to the area. In other reports it tells us that they were sent to look out for a caravan i.e., what the enemy were doing. The reports do not tell us anything about a command being given by the Prophet (p) to raid a caravan.
Even if we assume that the aim was to ‘raid’ the enemy’s caravan, I don’t see anything wrong with it historically speaking. Any military in the World would try target the opponents wealth, so as to weaken their military power. This has been used in ancient of times, to present day.
We also have to remember that a lot of wealth was stolen from Muslims by the Quraysh when they fled from Makkah, fleeing from persecution from the Quraysh. Hence, it was only right to take back what was theirs.
“God’s Messenger sent us who were three-hundred riders under the command of Abu Ubaida bin Al- Jarrah in order to WATCH the caravan of the Quraish pagans. We stayed at the seashore for half a month and were struck with such severe hunger that we ate even the Khabt (i.e. the leaves of the Salam, a thorny desert tree), and because of that, the army was known as Jaish-ul-Khabt.
Then the sea threw out, an animal (i.e. a fish) called Al-`Anbar and we ate of that for half a month, and rubbed its fat on our bodies till our bodies returned to their original state (i.e. became strong and healthy). Abu Ubaida took one of its ribs, fixed it on the ground; then he went to the tallest man of his companions (to let him pass under the rib).
Once Sufyan said, “He took a rib from its parts and fixed it, and then took a man and camel and they passed from underneath it (without touching it).” Jabir added: There was a man amongst the people who slaughtered three camels and then slaughtered another three camels and then slaughtered other three camels, and then Abu ‘Ubaida forbade him to do so.
Narrated Abu Salih: Qais bin Sa`d said to his father. “I was present in the army and the people were struck with severe hunger.” He said, “You should have slaughtered (camels) (for them).” Qais said, “I did slaughter camels but they were hungry again. … Qais said, “But I was forbidden (by Abu ‘Ubaida this time) (Sahih al-Bukhari volume 5, Book 59, Hadith 647)
“God’s Messenger sent us (on an expedition). We were three hundred riders and our chief (leader) was ‘Ubaida b. al-Jarrah. We were on the LOOK out for a caravan of the Quraish. So we stayed on the coast for half a month, and were so much afflicted by extreme hunger that we (were obliged) to eat leaves. That is why it was called the Detachment of the Leaves.
The ocean cast out for us an animal which was called al-‘Anbar (whale). We ate of that for half of the month and rubbed its fat on our (bodies) until our bodies became stout. Abu ‘Ubaida caught hold of one of its ribs and fixed that up. He then cast a glance at the tallest man of the army and the highest of the camels.
And then made him ride over that, and that-tnan passed beneath it (the rib), and many a man could sit in its eye-socket, and we extracted many pitchers of fat from the cavity of its eye.
We had small bags containing dates with us (before finding the whale). ‘Ubaida gave every person amongst us a handful of dates (and when the provision ran short), he then gave each one of us one date. And when that (stock) was exhausted, we felt its loss. (Sahih Muslim Book 21, Hadith 4757)
“Gods Messenger sent an army towards the east coast and appointed Abu ‘Ubaida bin Al-Jarrah as their chief, and the army consisted of three-hundred men including myself. We marched on till we reached a place where our food was about to finish. Abu- ‘Ubaida ordered us to collect all the journey food and it was collected.
My (our) journey food was dates. Abu ‘Ubaida kept on giving us our daily ration in small amounts from it, till it was exhausted. The share of everyone of us used to be one date only.” I said, “How could one date benefit you?” Jabir replied, “We came to know its value when even that too finished.” Jabir added, “When we reached the sea-shore, we saw a huge fish which was like a small mountain.
The army ate from it for eighteen days. Then Abu ‘Ubaida ordered that two of its ribs be fixed and they were fixed in the ground. Then he ordered that a she-camel be ridden and it passed under the two ribs (forming an arch) without touching them.” (Sahih al-Bukhari volume 3, Book 44, Hadith 663)
Muwatta Imam Malik:
“The Messenger of God, sent a delegation to the coast. Abu Ubayda ibn al- Jarrah was in command of them. There were 300 people and I was among them. We went out until we had gone part of the way and our provisions were finished.
Abu Ubayda ordered that the provisions of the army be gathered up and they amounted to two containers of dates. He used to give us a little provision from it each day until it was finished, and we used to have only a single date each. I said, ‘What use is one date?’
He said, ‘We will certainly feel its loss when they are finished.’ ” Jabir continued, “Then we reached the sea and there was a fish like a small mountain. The army ate from it for eighteen nights. Then Abu Ubayda ordered two ribs from it to be set up. Then he commanded that a camel be ridden underneath them and it did not touch them.” (Muwatta Malik Book 49, Hadith 24)
“The invasion of al-Khabt (diluted yoghurt) took place in the year eighth hijri i.e., before Al-Hudaibiyah Treaty. Abu Ubaidah bin al-Jarrah led three hundred horsemen to OBSERVE a caravan belonging to Quraish. Because of the inadequacy of food supplies, they began to starve so much that they had khabt (diluted yoghurt).
Hence the application ‘The Army of al-Khabt.’ One of the men slaughtered nine camels at three times, three each time at different stages of the mission, Abu Ubaidah, the leader of the campaign prohibited him from doing so.
The sea was generous and presented them with an animal called al-Anbar (sperm-whale) so rich in fat that they subsisted on it for half a month. When they came back home, they narrated the story to the Prophet, he who commented that it was provision granted by Allah, and asked them to share some its meat. …” 
 Sealed Nectar (‘Ar-Raheeq Al-Makhtum’), By Safi-ur-Rahman Al-Mubarakpuri, pagee 206