Logic separation. Now servlet runs service to execute groovy script. Thanks to this we can not only use servlet for executing scripts but also inject service (and use all nice feature the groovy console has. For example bindings, response as json etc)