If you have balls, you have a Y, or because of SRY gene. Your friend has the normal X and one mutated X that's mostly a Y chromosome that didn't form correctly, but still contains most of the Y chromosome genes and critically the SRY gene.
The whole XXX and XXY or XXXX and XXXXY and all the other genetic oddities that occur are still males if it ends in a Y.
Because that would exclude edge cases, less than 0.1% of the population.
I personally know one. He has XX karyotype, but has a dick and balls. Affects about 1 in 20,000 people.
Thankfully, he agrees with us, and knows he's a fringe example.
If you have balls, you have a Y, or because of SRY gene. Your friend has the normal X and one mutated X that's mostly a Y chromosome that didn't form correctly, but still contains most of the Y chromosome genes and critically the SRY gene.
The whole XXX and XXY or XXXX and XXXXY and all the other genetic oddities that occur are still males if it ends in a Y.
So they get excluded. 99.9% is good enough.