Because in Javascript, a statement can be terminated by a newline instead of a semicolon. The semicolon is essentially inserted automatically, but only where the result can be a full statement.
return;
is valid on its own, but then your function returns nothing and your "value";
has no side-effects.
On the other hand, your first example simply cannot be parsed this way because the line ends in the middle of a parenthesis.
These rules are described in §7.9.1 in the ECMA-262 standard document.