Say person A and person B are collaborating on a mathematics paper. It goes like this: person A repeatedly suggests proofs, and person B repeatedly finds flaws in them. Over time, this process culminates in a correct proof.
Does person B deserve to be an author on this paper? One might argue that the final paper would not have existed without B, so they deserve authorship. On the other hand, they did not actually contribute anything in the final work - each successive proof was generated by A alone.
Wikipedia says that the development of RSA went something like this: "Rivest and Shamir, as computer scientists, proposed many potential functions while Adleman, as a mathematician, was responsible for finding their weaknesses," until Rivest hit on the final answer. But that might be overly reductive, and I don't know of any other examples.
(As a final note, I'm not A or B in this scenario - I'm just curious.)