Like today, 250 years ago, theater owners wanted to make money, and therefore they programmed what they knew it would work. Program a Mozart operas was a good business in it's day and still today. Schubert's Lieder are wonderful but make less money, still today, than operas or symphonies. But this is all about the laws of market, 250 years ago and today. And we have to always consider that composers had to make money, like everybody else, so one can't blame Mozart for composing operas or Bach for composing masses. To Bach, his solo keyboard compositions where for practice and have fun, and still today they produce less money in tickets than his masses or oratorios. Aristocrats paid the composers for composing music for them and, of course, that included playing the premiere in a place of their choosing, like Beethoven's' 3rd for instance.The big halls were for the unaristocratic masses to hear 'pop' versions, while all the most demanding stuff was played for the aristocrats in their own homes.
Composers are aware where the piece will be played, and along with conductors, they care a lot about the environment in which they are performed, but they had and have little chance to choose it, and therefore they must have the ability to adapt their performance to the environment, for instance, lowering the tempo a bit if there is too much reverberation.
However, none of this is related to the quality of the music, perceived from us or from the composers themselves. And if there is some correlation is on the opposite side, because they wanted the piece that many people would hear to be as good as they can provide. Who can blame them? Just have a listen to Bach's Passions and compare them to the Goldberg variations, very popular today. The latter are easy to listen to because they are short, but they are dwarf side by side with a giant. Bach' didn't have any doubt of what was more relevant, nor anybody that listens both live. At home with a simple equipment they may sound comparable, but they are not.