Yep, you read that right, musicians have always improvised but once upon a time Classical musicians were not only improvising but performing improvised pieces live. Mozart often improvised live.
Let's set the Wayback Machine for the 9th century, yep, Medieval period, perhaps not the best of times but musicians were improvising then and often from conductors and composers instructed to do so. Singers of the time were exploring in a style of chant called organum. https://en.wikipedia.org/wiki/Organum
Now let's move the Wayback Machine forward to the Renaissance period which according to many historians the invention of printed music lead to published instruction manuals on improvisation, mostly in Italy. Singers and instrumentalists of this period would regularly improvise embellishments of melodies over various chord patterns.
Now let's move forward to the Baroque Period. Which when listened to today seems the the most structured of Classical music but at one time quite the opposite may have been true. While many historians will argue that in the period improvisation was more about minor embellishments to written pieces there is evidence to the contrary. Being a musician I am sure there was quite a bit of improvisation happening but perhaps not being performed in the major concert halls and opera houses of the time.
Modern day: Classical Improvisation may seem like a lost art but there is a growing number of classically trained musicians out there who are experimenting. For example, check out works by Thollem McDonas and his many collaborations. http://www.thollem.com/
To read more about the history of Classical Improvisation simply Google the term.