In the context of machine learning, notebooks are a crutch people lean on when the production environment lacks the right abstractions--isn't convenient enough. Notebooks fall under the "prototype smell" in Google's Hidden Technical Debt in Machine Learning Systems (2015).
I agree that notebooks are best reserved for exposition.
I use them too, but for data science rather than machine learning. The right abstractions include handling authenticating to the ML services, experiment tracking, hyper-parameter optimization, distributed compute, access to PII data, etc. If you're dealing with nonsensitive data that fits on a laptop you might not need these.
I agree that notebooks are best reserved for exposition.