In fairness, Batman writers have occasionally played with the idea that Alfred Pennyworth is known to be a friend of Batman. In at least one story Bruce Wayne said something to the effect of "Yes, I've met the Batman once or twice, but my butler knows him much better. Alfred fancies himself a bit of an amateur detective..." It isn't that much of a stretch to imagine Bruce and Alfred going out of their way to establish this idea as public knowledge, anticipating some situation where Alfred is seen helping Batman.
(Now I'm going back into the "has clearly thought about this too much" box...)