I like to think of the reason for the exception to the rule is that Japan can begin it’s combat turn, load it’s transports (which isn’t technically moving any pieces about the board), then decide, oh, let’s Declare War now. But in any event it’s an exception to the rule that I think is fair.
Page 12 of the Europe 1940 2nd Edition Rule Book
"Declaring War
…War must be declared on your turn at the beginning of the Combat Move phase, before any combat movements are made, unless otherwise specified in the political rules…Once a state of war is entered into, all territories and sea zones controlled by or containing units belonging to the power or powers on which you declared war instantly become hostile to your units, and the normal restrictions of moving into or through hostile spaces apply, with one exception. During your Combat Move phase in which you entered into a state of war, your transports that are already in sea zones that have just become hostile may be loaded in those sea zones (but not in other hostile sea zones). In effect, transports may be loaded in their initial sea zones for amphibious assaults before war is declared,
while the sea zone is still friendly."