Qatadah (may Allah have mercy on him) says regarding 'Then he drew lots and was among the losers' [Surah al-Saffat: 141]: he drew lots and lost. The Prophet of Allah Yunus (peace be upon him) drew lots and lost in the lot. The narrator says: The ship was held back, and the people realised that it had been held back because of a wrong that one of them had committed. So they drew lots, and the lot fell on Yunus (peace be upon him), and he threw himself into the sea. 'Then the fish swallowed him while he was blameworthy' [Surah al-Saffat: 142]: the fish swallowed him while he was blaming himself; he was regretful for what he had done. 'And had he not been of those who glorify (Allah)' [Surah al-Saffat: 143]: that is, he used to pray a great deal in times of ease, so He saved him.
Imam al-Shafi'i (may Allah have mercy on him) said: The drawing of lots by the Prophet (peace and blessings be upon him), in every instance in which he drew lots, has exactly the same meaning as that of those who drew lots for the guardianship of Maryam (peace be upon her), without differing from it.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب العتق / 21405