why do I have to use required parametres?

You don’t have to specify number of arguments, in which case it will default to one.

Essentially this argument gives you control on how many arguments hook will pass to function, which matters in few too many situations to come up with generic explanation.

In a nutshell if hook can pass N arguments, your options are:

  • pass 1 argument (default)
  • pass <=N arguments by specifying number
  • do not pass any arguments by specifying 0 (rare, but highly useful at times)

Note that you cannot change order of arguments passed, if you need Nth you will need to pass as many and then ignore unwanted ones in your function (which only makes sense in few hooks, because first argument tends to be meaningful one, rarely second).