Answer
The pen tool forms a path. It looks like you have a dark blue fill in your stroke and fill settings. Change the fill to “no fill” and you should just see the paths (with whatever stroke you have set). Any open path (which is not a closed shape) will fill even without being closed.
Attribution
Source : Link , Question Author : imantha , Answer Author : Kyle