When unlocking new areas, does the joining area have to be the final destination of the voyage?

For example: Route A-B-C-D, destination C can unlock E. Does the voyage A-B-C-D have the chance to unlock E or does it have to be A-B-C or A-B-D-C?

Thanks for the sure answers/clarifications.