It’s reflecting the Python frontend, which works in the same way.
.to() will be called recursively on all sumbodules and their parameters as well as buffers, which is why you don’t have to reassign modules.