The way it works is there is a marker in the BIOS that the Windows 7 installation looks for. Obviously, a different machine will either have a different marker (another manufacturer) or no marker at all (retail motherboard). The reason you cannot transfer the installation legally is because you're paying a subsidized price; Windows 7 costs you much less because the manufacturer cuts a deal with Microsoft. Essentially, you're paying more for hardware than you are for software.
What you can do legally, however, is replace the parts in your computer (other than the motherboard). Depending on what and how many parts you replace, Windows 7 will tell you that you need to reactivate. Call Microsoft and explain to them that you just upgraded a few computer parts and they'll reactivate it for you.