The command you are running (`nc` a.k.a. `netcat`) will listen for input when run with the `-l` flag. Normally, netcat in listen mode will close when it receives the end-of-file character, but the `-k` flag prevents that. In other words, netcat won't close until you kill it because of the way you invoked the command.
See the man page for more info.