Does the order of the build.gradle.kts matter?

Maybe I need to do a bit more learning with Kotlin, but I am wondering about the order build.gradle.kts files.

Why can I move the

plugins {

underneath the

application {
    mainClassName = ""

and everything still works? Shouldn’t I have to execute the plugin before I can call the application extension?