Ah, I have encountered something similar to this, but it is a far cry from what you stated in your first post that " it changes master boot records of every hard drive connected to the system".
Here is what actually happened, there are two parts to the bootloader. The first part is the GRUB loader that gets written to the MBR. The second part consists of the binary modules, configuration, etc. needed to boot your operating systems. The second portion usually is stored in the /boot folder of the partition you install to. Now the GRUB loader is told where to look for this GRUB folder, and if it can't find it (USB drive is removed), you won't be able to boot. These two components can and often are written to different drives.
The real issue is what I consider a user-interface bug in the Ubuntu installer. Instead of explicitly prompting the user regarding where the boot loader should be installed, it usually assumes /dev/sda (first bios drive) and gives you the option on a drop-down menu that is easy to skip through. So you do have the ability to tell Ubuntu where to put the boot loader, it's just easy to miss it. Also there was a bug with previous versions where even if you told it where to install the bootloader, it would still install on /dev/sda. Perhaps this is what you encountered.