Control + J joins two objects together and sometimes since it has open ended end it closes them with the curves being set to cyclic, Paul will probably confirm. The F key does as you say, it connects two points with a straight line, if you want to have a closed up stroke that you can fill.