When you are assigning a Tensor to another, they will share the underlying data.
Using .clone assigns the data to the new Tensor.
Example:
a = torch.zeros(10)
b = a
c = a.clone()
a[0] = 1
print(a)
print(b)
print(c)

Probably in the code you’ve seen, they will manipulate X later on and wish to keep Y as it is.