Hadith was ever since transmitted orally.
because this is the way knowledge was spread and gathered and so was the qur'an transmitted to us until today. As long as you have not cross-checked your memorization of the qur'an by a hafidh with a sanad to the prophet you may not be a hafidh of qur'an, but a hafidh of a moshaf.
In fact when it comes to hadith sciences scholars used to consider a teacher who needs his book notes to transmit his hadith as rather less reliable. As memorization abilities are regarded an essential criteria for Islamic knowledge.
Therefore even in hadith collection such as those Sahihs of al-Bukhari or Muslim you read terms like:
حَدَّثَنَا hadathana (we were told by)
أَخْبَرَنَا akhbarana (we were informed by)
etc. if a hadith was transmitted by another way this is usually also fixed for example if student read from teachers book this is usually quoted (See for example here حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، قَالَ قَرَأْتُ عَلَى مَالِكٍ).
One interesting difference between both Sahihs is that Muslim often gathred narratives with the same wording and a wide matching of paths (narrator chain parts) in one saying for example "Scholar X" and "Scholar Y" informed us from "Scholar Z" ..
This tradition is kept until today students of hadith try -similar to hafdihs of qur'an- have a connected sanad to the source of the hadith then the best among them try to reach a high sanad: short narrator chain.
For example later scholars even used to add the date/time/location where the knowledge transfer happened see for example in my answer Is it permissible to recite this everyday?
See also other formulation of hadith transfer in What is the difference between the different formulations used in describing how a hadith was transmitted?
Example of two different approaches in the compilation
There might or might not be different approaches, as we don't have the original works of al-Bukhari, Muslim, Malik etc. at hand. However it would be logical if a hadith scholar would mention his teacher in first place and then those who reported the chain. What I'm describing in the following is the works or compilations as we are having at hands by now, and I'm referring to original hadith sources in which the full narrator chain is mentioned.
As for imam al-Bukhari ended the compilation of his sahih 232 a.H. and he started teaching it for 24 years until his death. In the modern day copies of Sahih al-Bukhari we may find the sanad from al-Bukhari down to the prophet(). So the first person mentioned in each narrator chain is the teacher of al-Bukhari.
While in fact the Sahih was transmitted to us by Muhammad ibn Yusuf al-Farbari محمد بن يوسف الفربري, Ibraheem ibn Ma'aqal an-Nasafi إبراهيم بن معقل النسفي, Hammad ibn Shaakir an-Nasawi حمّاد بن شاكر النسوي, Hussain al-Mahalli حسين المَحامِلي, Mansur ibn Muhammad al-Bazdawi منصور بن محمد البزدوي to name some of the known transmitters (Source).
In contradiction to al-Muwatta' which imam Malik started compiling from a source of 100.000 hadith and had somewhere 10000 narration (hadith, narrations and fatwas of shabah and tabiy'n etc.) in the original version and year by year Malik repeated his cross-check until the content was less than 3000 narration. If you open for example the Muwatta' version attributed to Yahya ibn Yahya al-Laithi you may find some of the narration starting by:
حَدَّثَنِي يَحْيَى بْنُ يَحْيَى اللَّيْثِيُّ، عَنْ مَالِكِ بْنِ أَنَسٍ
Yahya ibn Yahya al-Laythi related to me from Malik ibn Anas
وَحَدَّثَنِي يَحْيَى، عَنْ مَالِكٍ
حَدَّثَنِي عَنْ مَالِكٍ
So in many cases it is the student who wrote a copy of the hadith he has heard from the teacher from which he received an ijazah (Malik in the given case) that is the first person which the hadith report starts mentioning. In this way we had at a time around 100 versions of Malik's al-Muwatta' from which at least 10 survived. But as Yahya ibn Yahya al-Laithi is the last student that got ijazah from Malik for his copy, this copy is often referred to as al-Muwatta'. As Yahya ibn Yahya al-Laithi was more known as a faqih than a hadith scholar this approach might not be general. As for Muahmmad ibn al-Hassan a-Shabyani in his version starts with for example:
Malik informed us
And the versions of some other students like al-Qa'anabi switch between the statements that Malik informed them or that they read in front of Malik (from his al-Muwatta').