Actions may include stand-alone expressions, that is expressions without an assignment (to a 'left side' object) or if() clause. A stand-alone expression cannot change any attributes but a few expressions have useful side-effects, including use of the runCommand, linkTo, linkFrom, unlinkTo, and unlinkFrom operators.
In fact, such operators do return a value but it is a true/false success report boolean. As such output is generally of no practical use, this saves the need for adding a user attribute simply to run this type of operator. But, should the success state be necessary for a following action, the result can be assigned to a left-side boolean attribute:
$MyBoolean = runCommand(....
or, encapsulate the to-be-tested code in an if() operator.
User functions are another case. An action expression may simply be a call to a function. The evaluated expression (action code) results in the function running. The overall effects of that reflect the code in the function, but are unrelated to the calling action save for the fact that if the overall action has multiple actions, later actions will not be run until the function has completed.
The action() function makes it easier to execute standalone code expressions.