I have a RoutedUICommand command which can be fired in two different ways:
ICommand.Execute upon a button click event;>
JoeGaggler, a colleague of mine, has apparently found the reason for this behavior:
I think I found it using reflector: if the command target is null (i.e. keyboard focus is null), then the ICommandSource uses itself (not the window) as the command target, which ultimately hits the CommandBinding for the window (this is why the declarative binding works).
I'm making this answer a community wiki, so I don't get credits for his research.