Martin (1992: 109):
According to the Oxford English Dictionary, any was typically used in Old English in interrogative, hypothetical or conditional clauses, where the participant referred to has a speculative existence. So it seems a natural development for this item to extend its meaning to take over the dismissive 'it doesn't matter who' reference referred to as [unrestricted].
This confuses the deictic function of determiners — indicating whether or not a specific subset of a Thing is intended — with their referential function. Unlike genuine reference items, non-specific determiners like any and some do not present an element as identifiable.
And for the record:
[A]ani refers to single entities, amounts, etc., occurring at random or chosen at random, as being convenient, suitable, to one's liking, etc. It is frequently emphatic and generalising, having the force of 'any whatever, any at all' and 'any and every'. It is common in questions, conditional clauses, and negative statements, but not in affirmative statements (where som is used instead). [Middle English Dictionary]