Difference between wire and logic for this particular problem
The difference is in the meaning of the RHS of the = in the signal declaration.

wire out = RHS;


is equivalent to

wire out;
assign out = RHS; // continuous assignment


And

logic out = RHS;


is roughly equivalent to

logic out;
initial out = RHS; // procedural assignment before time 0


This assignment happens before executing any other initial or always block.