The man asked Imaam Abu Hanifa "Can I pray behind this man?" Imaam Abu Hanifa Rahimullah replied "We cannot pray behind either of the two of you."
The man became surprised and asked why, and the Imaam replied "because he holds a belief that
is deviant from Islam and you, (refering to the man who asked the question), you argue about matters of religion."
Imaam Al-Ghazzali says in Bidayat Al-Hidayat that he consideres argumentation in matters of religion a major sin of its own.
These days there are Imaams/people who actually enjoy debating on matters of religion, and for some it is simply in their nature to just uneccesarily debate and constantly prove their point to others. However all this really shows, is that they themselves are uneasy and confused in their own heart and it is thus the reason why it should be avoided to pray behind such people, and in my view to stay away from such people completely.