Great point, I used ML only as an example, GraphQL was another that came up in comments.
Books are a good resource, or college literature for example, but from an approachable point of view, without knowing the 'basics' it's hard to consume.
It is true that a lot of platform specific nastiness and complicated math occurs in some of these libraries which is not necessary for a user to learn. But for those desiring to learn "what's happening under the hood", the code should not make an effort to needlessly obscure this from them by way of complicated syntax, poor interface design, academic naming practices, and big unwieldy spaghetti classes.
There might come a day where companies believe that the value of slapping a few potentially buggy libraries together is not worth $xxx,xxx per year. I for one kind of hope that companies return to buying/contracting well-defined finish products with small external studios rather than throwing money at W2 developers like us. I think the software quality will be higher, and the risk of our jobs being outsourced lower, wherher rightfully so or not.
In this case, if you want to understand how stuff works, you should explicitly look for things that are not labeled "tutorials" - often textbooks will be a decent example, covering the principles and theory behind these abstraction layers which you'll then use in practice.