why can quotes be left out in names of gradle tasks

As an example in a GroovyConsole runnable form, you can define a bit of code thusly:

// Set the base class for our DSL

@BaseScript(MyDSL)
import groovy.transform.BaseScript

// Something to deal with people
class Person { 
    String name
    Closure method
    String toString() { "$name" }
    Person(String name, Closure cl) {
        this.name = name
        this.method = cl
        this.method.delegate = this
    }
    def greet(String greeting) {
        println "$greeting $name"
    }
}

//  and our base DSL class

abstract class MyDSL extends Script {
    def methodMissing(String name, args) {
        return new Person(name, args[0])
    }

    def person(Person p) {
        p.method(p)
    }
}

// Then our actual script

person tim {
    greet 'Hello'
}

So when the script at the bottom is executed, it prints Hello tim to stdout

But David's answer is the correct one, this is just for example

See also here in the documentation for Groovy