Classical music’s popularity grew throughout the 18th and 19th centuries when musicians blossomed in composing orchestral masterpieces. We can divide different eras.
The composers recognized the importance of the acoustics in a room or space. They thought about how the sound would bounce around in the room and how it would affect how people heard the music. This led them to compose music specifically for each individual room, instead of finding a room that would fit the piece of music.
A great example is “Toccata and Fugue in D Minor" , written by Johann Sebastian Bach. It is a musical composition played on an organ, which is ideal for a cathedral with an average reverberation time of 5 seconds.
On the other hand, it was Mozart who composed music to be played in highly furnished chambers. Many of the operas he wrote are performed best in rooms with a reverberation time of 1,00-1,30 seconds. 
So why didn’t they start designing rooms and concert halls with optimal room acoustics? Because the science of acoustics was still considered a mysterious combination of many different and undefinable factors. But that all changed at the end of the 19th century.