That's the beauty of music. You can take a theme from a Bach sacred chorale and improvise. It doesn't make any difference where the theme comes from the treatment of it can be jazz.
One of the great questions of philosophy is do we innately have morality or do we get it from celestial dictation? A study of the Ten Commandments is a very good way of getting into and resolving that issue.