"Playing devil's advocate refers to intentionally disagreeing for the purpose of stimulating discussion. It stems from a phrase used in Catholicism.
During the process of declaring an individual to be a saint, the Catholic church would appoint a canon lawyer to argue against the canonization. This person was referred to as the Promoter of Faith but was commonly referred to as the Devil's advocate. It was this person's duty to look for evidence of fraud in relations to any miracles attributed to the individual being considered for sainthood or any other reasons why the canonization should not be performed. In opposition to the devil's advocate was the Promoter of the Cause, also known as God's advocate.
The phrase is still in use in modern language outside of religious settings. References to playing devil's advocate are found in political debates as well as works of fiction.