bash has optimization when the most recent command in a script is implicitly executed with exec. Dash recently got this optimization, but not yet in the version you are using. You will see the same behavior with bash -c 'exec ps'and dash -c 'exec ps'.
source
share