The journey of coffee started in highlands of Ethiopia when the goat herds noticed that when goats chewed on the leaves of these coffee plants they would get hyperactive. It seemed that some of the goatherds also used to chew these leaves just like we chew betel leaf. It was then it was realised that there was a certain benefit to it and they decided to carry the seeds to the Caliphs. The Caliph in a fit of rage threw the seeds into fire. It was then the aroma of roasted coffee came out. Eventually the smell of the roasted coffee made a huge difference, to just raw coffee seed or its leaves and that is when the coffee drinking of roasted coffee seeds started mushrooming.
This is one of the reasons why Vienna supposedly has the best coffee because of the fact that Vienna was governed by the Caliphate. From there is spread to Portugal, France and England. There are still some of old plants existing in The Hapsburg Palace in Vienna which has some of the old plants which they take outdoors in the summers and take it back indoors in the winters. Portugal was given some seeds and the Prince of Portugal took it to Brazil and that is how it started the history of coffee in Brazil.
In the early days, viable coffee seeds were considered precious enough to be given to royalty. You do not give ordinary gifts, to royalty. For instance, 10 viable seeds were considered extremely valuable and given as dowry to the prince of Portugal who finally ruled as king of Brazil.