while not legal, it's often possible.
read your end-user license agreement, you did not "buy" windows with that original computer, you bought a license to run windows on that exact computer.
the only license that are transferable are retail (boxed copy for example) or volume-licensed (enterprise level stuff). oem and system-builder licenses are non transferable, been that way for a long time.
i point this out not to chastise but simply to highlight how ridiculous software licensing is/has become.