In a Nutshell:
Whilst the shari'ah acknowledges the importance of trade and partnership, it also prohibits any illicit gains. It allows the traders to co-operate with whoever he wants, providing the none contradiction and the emanation from the shari'ah framework.
Scholarly Opinion
The Hanafi jurist Imam Kasani is representative of the consensus of the jurists who say partnerships are permitted:
الشََرِكَةُ تَنْعَقِدُ عَلَى عَادَةٍ التُجَار
"Partnership is held according to traders' custom." (al-Kashani, Bada'I' as-Sana'i' fi tartib ash-Shara'i', Vol. 6, p. 69.)
The Prophet (saw) recognized financial partnership in trade and said:
إِنَّ اللَّهَ يَقُولُ أَنَا ثَالِثُ الشَّرِيكَيْنِ، مَا لَمْ يَخُنْ أَحَدُهُمَا صَاحِبَهُ فَإِذَا خَانَهُ خَرَجْتُ مِنْ بَيْنِهِمَا
"Allah, Most High, says: "I make a third with two partners as long as one of them does not cheat the other, but when he cheats him, I depart from them." (Sunan Abi Dawud 3383.)
The Prophet (saw) himself also practiced it. It was narrated al-Sa'ib said to him:
كُنْتَ شَرِيكِي فِي الْجَاهِلِيَّةِ فَكُنْتَ خَيْرَ شَرِيكٍ كُنْتَ لاَ تُدَارِينِي وَكُنْتَ لاَ تُمَارِينِي
"You were my partner during the pre-Islamic period of ignorance and you were the best of partners, you did not contend or dispute." (Sunan ibn majah, Book 12, Hadith 2375.)