To agree to disagree involves a conscious agreement to disagree where this may be desirable, such as in a democracy, by enabling important issues to be exposed to others who need to consider them for themselves. This leads to concepts such as a devil's advocate and a loyal opposition as part of a scrutiny process.
The phrase is sometimes used in other cases to describe the position where two parties recognise that they disagree and, after failing to persuade each other, remain on friendly terms while continuing to disagree and while seeing disagreement as undesirable. A clearer phrase in this case might be to agree that they disagree.