Why is namelessness so prevalent in literature - especially modern literature?"
The primary response to this interesting question is that the term "modern" itself refers to the departure from the unwritten rules of literature as practiced ad covertly enforced of traditional, that is eighteenth and nineteenth , literature. Ever since the origins of epic (more than one narrator) poetry, let us say the Iliad and the Odyssey, the "raison" has been to tell a story with an overt or implied moral lesson, imbedded in the protagonist' journey through various hardships and trials. The modern novel tries to universalize this journey and relate the story of "Everyman," that is, each of us, by our own facticity, by the very fact of our human existence. One effective way to convey this universality is by keeping out the real, social "name" of the protagonist out of the story, so that we, the reader/consumer of the narrative, can put ourselves into that slot. Even when an arbitrary name is supplied (Mersault, Gregor Samsa, etc.), modern literature is moving away from the "exceptional hero" idea (Ulysses, Tristan, etc.) to the universal, anonymous human actor or victim of fate.