Because the other person beats you to it, so by the time your /kick command reaches the server he has already left the channel.
That script could be greatly improved, but "nonsense kicks" are never even anywhere near perfect so I'd just remove it altogether.