The final statement has a matrix on the left-hand-side (LHS) and a column on the right-hand-side (RHS).
You have two different cases: inside the ForEachRow, and outside. If inside, there is an implicit row and the column resolves to a scalar. If outside, there is not an implicit row. You probably had exactly one row selected when it worked inside the ForEachRow.
a column matrix (LHS) only supports a scalar on the RHS. It won't work right with a matrix on the RHS.
You can use Data table subscripting instead. That treats the table as a 2D matrix (3 rows, 1 col in this tiny example.)
dt = Open( "$sample_data/big class.jmp" );
dt[[2, 3, 4], {name}] = dt[[5, 6, 7], {name}];
Craige