Hi Amine,
To your first question, why not use Rec directly? They are “simply” transferring the local Rec variable to a global ItemJnlLine variable used throughout the codeunit. If they where not updating Rec again before exiting, then the VAR would not have been updated in the calling object.
The COPY function copies either to the current record or the specified record. COPY(Rec) would just copy itself. The “current” record can also be “over written” with a “WITH RecordVar DO” statement.