The difference is that the script in the archive is executed as a single composite operation. So, looks like the driver is not yet available when the datasource is added.
The --file argument executes commands separately, i.e. one after another.
Thanks for bringing this up, that's an issue.