Here is how:
Person X could have inherited two pieces of DNA from an ancestor. We'll call those pieces 1 and 2.
My father may have inherited piece 1. Cousin Mary may have inherited piece 2.
Therefore Dad and Cousin Mary could match to the same person without matching to each other.
Ok, AncestryDNA, you win.