I can not really explain why this is happening, but I can offer you 3 solutions that will stop this.
Solution 1
You can manually turn off automatic linepraking in the option inspector:

Solution 2
Another aproach to prevent this is to use a \[NonBreakingSpace]
right after the comma character: ",\[NonBreakingSpace]"
.
Type it in with Escnbs
Esc.

I would prefer the second solution, because generally turning of the linebreaking might not be such a good idea.
Solution 3
Since typing in Escnbs
Esc is indeed not very practical, you can use this setting for all input cells:
LinebreakAdjustments->{0.5, 10, 100, 1, 0.5}
From the docs of LinebreakAdjustments:
The default setting LinebreakAdjustments->{0.85, 2, 12, 1, 1}
represents an empirical choice that works well for most Mathematica input. An alternative setting that gives good results for program code is LinebreakAdjustments->{0.5, 10, 100, 1, 0.5}
.
It can be set globally in the Option Inspector right below "LineBreakWithin", but I would suggest to edit the default stylesheet and add this option for all input cells.
How to: Edit a Stylesheet (see last edit for quick solution)
Open a fresh notebook. Go to Format -> Edit Stylesheet...
Add a new cell to the stylesheet notebook. Chose Cell -> Show Expression, replace the cell-content with:
Cell[StyleData["Input"],
LinebreakAdjustments->{0.5, 10, 100, 1, 0.5}]

This will add the modificated linebreak adjustment to the default options of any input cells.
Go to Install Stylesheet... and type in an instal name e.g. NonBreakingDefault.
From now on you can chose this stylesheet from the menu Format -> StyleSheet. You can also set this stylesheet as the default stylesheet wich is loaded, when you open a new notebook. You can do this also in the option inspector: Global Options -> File Locations -> DefaultStyleDefinitions. Chose the stylesheet. You will find it in FileNameJoin[{$UserBaseDirectory, "SystemFiles", "FrontEnd",
"StyleSheets"}]
EDIT2:
This code will automatically create the needed stylesheet for you:
CreateDocument[
Notebook[{Cell[StyleData[StyleDefinitions -> "Default.nb"]],
Cell[StyleData["Input"],
LinebreakAdjustments -> {0.5`, 10, 100, 1, 0.5`}]},
StyleDefinitions -> "PrivateStylesheetFormatting.nb",
WindowTitle -> "NonBreakingDefault"]]
Just evaluate the cell and after it opens, you can instal the stylesheet.