EdDSA point encoding difference between documentation and implementation
Could you explain the meaning of the word &quot;copy&quot; in this sentence &quot;copy the least significant bit of the x-coordinate to the most significant bit of the final octet&quot; ? Why isn't the bit copied in the code ? Why is it just a bitwise OR ?

First of all note that;

# Points are represented as tuples (X, Y, Z, T) of extended
# coordinates, with x = X/Z, y = Y/Z, x*y = T/Z

So the zinv comes from there and

x = P[0] * zinv % p
y = P[1] * zinv % p


Uses to find x and y
Now the last line does what the RFC describes in a simple way.

int.to_bytes(y | ((x &amp; 1) &lt;&lt; 255), 32, &quot;little&quot;)

The code is just a demonstration of the result. In your programming environment, you can use copy bit by bit, and it will be way slower.
A bitwise or operation is much faster than bit by bit copy. Also, as you can see there are no range check or if to check boundaries. Since the formula is fixed you can use whatever optimization is needed as longs as your code doesn't leak information.
Final note: you restrict yourself with the bit-by-bit copy. Doesn't the result copy the values into the return value?