When you install Windows, it sets itself up to run on your current hardware. Add in specific drivers and you have a Windows installation that will only work (well) on that setup. That's a simplified explanation but it gives the gist of the matter.
When you moved the hard drive to a different motherboard, you completely changed the hardware (as far as Windows is concerned). This is why I am amazed it even booted or is not throwing constant blue screens.
XP would allow you to perform a repair installation that reacquainted XP with your hardware. This would reassign Windows to work with what was there regardless of what was there before (most of the time). Vista and 7 do not have this option.