Three things. There’s Gradle plugins, module dependencies, and build dependencies which are placed on the classpath of the build tool (Gradle daemon itself).
The classpath setting is needed for Gradle, not your app. For example, this allows this includes the Gradle Build Tools for Android into the classpath, and allows Gradle to build apps.
Why can’t they all be in one build.gradle file?
They probably can be. It is simply more modular to not.