There are likely to be a number of internal resources that use localhost to resolve inter process communications.
For instance, the following are several processes on my machine (localhost) with established connections to 41416
localnode 3005 macuser 19u IPv4 0xe2bc92d35e17979d 0t0 TCP localhost:41416 (LISTEN)
localnode 3005 macuser 21u IPv4 0xe2bc92d3718ca19d 0t0 TCP localhost:52495->localhost:41416 (ESTABLISHED)
localnode 3005 macuser 22u IPv4 0xe2bc92d3718cb49d 0t0 TCP localhost:41416->localhost:52495 (ESTABLISHED)
com.apple 3238 macuser 16u IPv4 0xe2bc92d36c12819d 0t0 TCP localhost:52528->localhost:41416 (ESTABLISHED)
com.apple 3238 macuser 17u IPv4 0xe2bc92d36c12819d 0t0 TCP localhost:52528->localhost:41416 (ESTABLISHED)
Using 'ps -ef | grep 3005' and 'ps -ef | grep 3238 I see these are communications between webkit (3238) and Ubersicht (3005) which is for desktop "widgets" that are regularly refreshed on my desktop.
When you kill processes that are meant to always be running, or are sub-processes of a master process, launchd or the master will re-spawn them.
Using ps -ef, you can determine which processes are using the ports. Activity Monitor has a few analysis tools you can use to get a better idea what these are doing.