I see code blocks all the time where people make it unnecessarily complicated. What is the reason for this?

Example:

```
const greet = function (greeting) {
return function (name) {
console.log(`${greeting} ${name}`)
 }
}

const greeterHey = greet('Hey');
greeterHey('test')

```

instead of something like this

```
const greet = function (greeting, name) {
console.log(`${greeting} ${name}`)
}

const greeterHey = greet('Hey', 'test');

```

What is it all about? Does it have anything to do with the fact that when you edit the code block later, it's easier?