Bach was what we now would call "old school." He believed there was a God in heaven who governed the affairs of man and was worthy of our worship. He preached sin and redemption in his music, and saw Jesus as the only hope of mankind. As a master composer and performer, the saw the purpose of music as something to glorify God and build up the soul. Even his "secular" works were dedicated to God.
Frederick, on the other hand, was a man of the Enlightenment. He believed that man was the master of his destiny and that science, government, warfare, and art would bring about the best of all possible worlds. As King of Prussia, the forerunner of today's Germany, he captured much territory, began to unite the disparate nation-states of that area, and was arguably the most powerful man of his time. (And you say, "Who?")
Bach and Frederick the Great met each other exactly once, when Bach came to visit his son Carl Philipp Emanuel, who was in the king's employ as a musician. Frederick, himself a musician of modest ability, presented Bach with a theme that he (or Carl?) had written, and he challenged Bach to play a three-part fugue on this convoluted, rather unmusical theme. Apparently this was a taunt and a mean challenge, but Bach rose to the occasion, and according to a newspaper report of the time, astounded his hearers with the fugue he improvised.
Not to be shown up, Frederick challenged Bach further by asking him to improvise a six-part theme. Bach couldn't do it, and Frederick sent him home with his tail between his legs. The tail came out a couple months later, however, when Bach mailed off to Frederick what we now know as "The Musical Offering," which includes not only a six-part fugure on the king's theme, but several other pieces which use the theme as a starting point. Even the title "Musical Offering" is an interesting invention, as it can also be translated "Musical Sacrifice." Every indication is that Frederick's theme was designed to show that Bach wasn't such a wonderful musician, after all...to cut him down to size by presenting a royal theme beyond Bach's compositional or improvisatorial abilities. Bach was "sacrificed" on the altar of Frederick's malevolence (Frederick at this point in his life being a lover of only himself - he came from one messed-up family, that's for sure), but Bach came back to life and wrote something that is still played and listened to today. Few people, on the other hand, bother to read the books Frederick wrote.
All of this is simply excessive set-up to a quote from Gaines's book that draws an interesting distinction between beauty and prettiness. Without religion, can beauty exist?
Bach's Musical Offering leaves us, among other things, a compelling case for the following proposition: that a world without a sense of the transcendent and mysterious, a universe ultimately discoverable through reason alone, can only be a barren place; and that the music sounding forth from such a world might be very pretty, but it can never be beautiful.