very weird. I would suspect a hardware malfunction like the mouse/keyboard/wacom buttons But first what is you full Ae version and Os?
I just discovered the solution, I had to make sure that the pen tool's fill was set to "off". At least I think so, now the path is not closing automatically.
Ahhh now I get it. It's the common behavior for a fill in an open path. So if you draw a path (either in Ae,Ps,Ai) make sure the fill is blank.