Mozart was relatively poor because he was terrible with money. Some of his contemporaries, especially opera composers, did very nicely indeed - something which continued to be true for centuries.
Handel was easily the equivalent of a modern multimillionaire. Some performers and/or composers - Paganini, Liszt, various opera singers - earned far more for each performance than modern artists do.
But the point was that Mozart didn't need to be rich to do great music.
Whether he deserved to be rich is another question (more related to morale than economics).
Aloys. — Perhaps the hope of future riches and possessions induces you to choose this life? If this is the case, believe me you must change your mind; not Plutus but Apollo rules Parnassus. Whoever wants riches must take another path.
Joseph. — No, certainly not. Please be sure that I have no other object than to pursue my love of music, without any thought of gain. I remember also that my teacher often told me one should be content with a simple way of life and strive rather for proficiency and a good name than for wealth, for virtue is its own reward.
[1] https://en.wikipedia.org/wiki/Johann_Joseph_Fux#Gradus_ad_Pa...