"They gathered against Moses and Aaron and said to them… 'Why do you exalt yourselves over the congregation of God?'" Numbers 16:3
Korach's rebellion against the authority and leadership of Moses is used by our sages as the paradigmatic case of an argument that is "not for the sake of heaven". "What is an example of a machloket which is for the sake of heaven?" asks Pirkei Avot. "The machloket between Hillel and Shammai. And what is the example par excellence of a machloket which is not for the sake of heaven? This is the argument of Korach and his followers."
Note that the formulation of the latter is different than the former. To be consistent, the Mishnah should have stated that the illegitimate argument is the one between Korach and Moses, since it was Moses's leadership being called into question.
Social psychologists list several distinctions between a debate and a dialogue. A debate assumes that you have the right answer, while a dialogue assumes that many people can share in crafting an answer. A debate is about winning; a dialogue is about exploring. A debate is more about defending your view; a dialogue admits that another's thinking can help you improve yours.
A dispute for the sake of heaven is one which is borne out of similar intentions to ascertain the truth. When you have pure motives, then you are willing to countenance the ideas and opinions of someone else. Hillel was willing to hear Shammai and vice versa: this is a legitimate form of dialogue.
But if you are unwilling to hear the opinion or rationale of the other - as was the case with Korach and his followers - and if you are motivated by a personal agenda and self-aggrandisement, then this is not dialogue, but crude debate.