Notebooks aren't competing with scripts, they're competing with REPLs.
ML and scientific applications in particular tend to have segments that run for a long time, but then you'd like the resulting script to be in a state where you can mess with it, maybe display some multimedia output, etc, without re-running the long-running segment. Notebooks fit this need to a tee.