If you type the above words in your favorite internet search engine, you'll see that they have been pronounced by a number of musicians and/or music critics, including Sting. This phrase has also been used to entitle studies on the alleged benefits of music as a skill-building tool.
What everybody who I've heard use this phrase has missed so far, however, is the earliest known source of this maxim in a literary text. Such honor belongs to Shaw's Love Among the Artists. In this novel, one of the main characters (a composer), complains about how little one can make out of music for different reasons. And yet, when interrogated about the rationale behind his love for music, money does not rank very high:
“…That fantasia of mine has been
pirated and played in every musical capital in Europe ; and I could not afford
to buy you a sable jacket out of what I have made by it.”
"It is very hard, certainly.
But do you really care about money?"
"Ha! ha! No, of course not. Music
is its own reward. Composers are not human: they can live on diminished
sevenths ; and be contented with a pianoforte for a wife, and a string
quartette for a family.”
It is not too difficult to link the main idea in these words with Shaw's general insights on music, as demonstrated in his music criticism and his general appraisal of performers, composers, and people in the music business. To begin with, this idea of music being its own reward is further elaborated in Love Among the Artists, just like some sort of fundamental axiom, when Aurelie remarks:
"Music
is my destiny, as painting is thine."
In principle, this may seem like an early contradiction to Shaw's notion that "art for art's sake" is just nonsense, as he put it in the Epistle Dedicatory to Man and Superman.
"No doubt I must recognize, as even the Ancient Mariner did, that I must tell my
story entertainingly if I am to hold the wedding guest spellbound in spite of
the siren sounds of the loud bassoon. But "for art's sake" alone I
would not face the toil of writing a single sentence."
At any rate, I shall not go on about a topic I know so little about, lest I become one of those music critics Shaw dreaded:
"Nobody knows better than I do that a
musical critic who is always talking about music is quite as odious as an
ordinary man who is always talking about himself. I venture to hope that I have
never been guilty of the latter vice; and I shall try to steer dear of the
former."
I will not go as far as to say that
Shaw succeeded in his ethical endeavors, but that's one of the reasons we still talk about him!