Whatever you think of classical music, Mozart and even Beethoven were improvising too, specifically during solos:
It is believed that Mozart improvised his own cadenzas at concerts. …. This place in his scores was always left blank, with a fermata (pause sign) over the six-four chord, leaving the choice of what to play to the performer’s discretion.
So why is his music written down at all?
We could easily have remained ignorant of what sort of thing Mozart himself did in his solo concerti when the cadenza moment hove into view. But fortunately for us, Mozart’s students didn’t share his improvisational gifts, and so, when a pupil of his was going to play one of his concerti, Mozart accommodatingly wrote out an improvisatory-sounding cadenza for him or her (usually it was her) to use.
At these times, the “composer and the soloist were usually the same person, the requirement to provide the latter with an opportunity to show off was no great imposition on the former.” If the creator and the consumer, or the designer and the audience, are the same person or closely aligned, does that give one more license to improvise?