PBS has an article about Brubeck's Mass and why his musical compositions included some with religious themes:
Dave has always composed what he sees and feels, so it's little surprise that his experiences as a GI in World War II deeply influenced his early compositions and post-war performances. 'So many of my friends got killed in World War II that it just seems impossible that I wouldn't see them again,' Dave remembers. 'On the parachute landing on D-Day, one of my friends got shot in the air in his harness of his parachute. And you just hear about all your friends that didn't make it. It gives you a sense of, 'Why am I here? Why did they get killed?' And then also you say to yourself, 'I'm alive and I'm gonna do as much as I can.''.... 'At that time I was thinking about composing a piece - I was in my early twenties - on the Ten Commandments, concentrating on all the commandments but concentrating mostly on 'Thou shalt not kill.,' Dave explains. 'And knowing that our enemy, being Catholic from Italy, basically they knew these same Ten Commandments. The Germans being Catholic and Protestant, knew these same Ten Commandments. Why didn't they stick with us? And why is there a war if this is one of our commandments from God is that you shouldn't kill each other? It's still a part of many of the religious pieces I write.' Brubeck's questions about the meaning of life and death filtered into his music.
yes, he was a veteran: from wikipedia
After graduating in 1942, Brubeck was drafted into the army and served overseas in George Patton's Third Army. He was spared from service in the Battle of the Bulge when he volunteered to play piano at a Red Cross show; he was such a hit he was ordered to form a band. Thus he created one of the US armed forces' first racially integrated bands, "The Wolfpack"
more, including links, at GetReligionBlog.