Say you're analyzing a completely "new" unstudied language, and you come across a set of sounds [g],[k] that are in complementary distribution and that you suspect are allophones of the same phoneme. What do you then call this phoneme? Do you just ask the native speakers what sound they think it is? Or look at elsewhere conditions? Why call it /g/ over /k/, or not something entirely different?
One type of argument is based on "behaves like". Suppose for example that there is a contrast between /p,b,t,d/ but [k,g] is predictable by rule. If /b,d/ do things that /p,t/ don't do and the mystery sound does the same thing that /b,d/ do, then you have evidence that it is /g/. Another is based on simplicity of resulting rule system. For example, if [k] only exists word-finally, then a rule /g/ → [k] /__# is simpler to formalize, but a rule turning /k/ into [g] before a consonant or vowel is more complex. One problem with the simplicity argument is that it depends on having a theory of rule-formulation. A related problem is that people are fond of reifying heuristics like "you get X in this context, and Y elsewhere" into a rule where "/z/ → Y elsewhere" is an actual possible rule. (The problem is that "elsewhere" has no independent meaning and instead stands for a complex kind of rule that produces two different outputs – the "elsewhere" rule isn't actually a separate rule). This presupposes that you have a good enough reason to think that the two surface sounds have the same underlying form. Simple complementary distribution is not an automatic reason to assume a difference between surface and underlying forms.
Poetic conventions and language games may provide some evidence. See this previous discussion here and my answer: psychological reality question.