The Greeks had calculated the earth's circumference hundreds of years before, thus proving the earth was round, yet most people believe the myth that everyone back then believed the earth was flat. How did this happen?
Not only did the Greeks know the earth was round and estimate the earth's cirumference, Arab astronomers managed to estimate the earth's diameter roughly accurately in the 9th century AD. Ahmad al-Farghani (c. 850 AD) observed that the earth's roundness could be seen every time a ship's mast disappeared in the distance. Even Christian theologians such as St. Augustine, Bede, Roger Bacon and Thomas Aquinas described the earth as a globe (Bennett 77).
According to Bennett, Washington Irving popularised the "flat earth myth" in the 19th century. Modern arrogance in assuming the backwardness of people in the Middle Ages allowed the myth to catch on then and never go away. Bennett suggests Russell, Inventing the Flat Earth: Columbus and Modern Historians, 1991 as a good source for further information.
Source: Bennett, Medieval Europe: A Short History, 2011.