The method RegisterInstance of the UnityContainer will always override the last registration entry if you do not distinguish them by name.
So if you call
container.RegisterInstance<IHardware>(new HardwareB());
you will override the registration for the interface IHardware and will retreive HardwareB on the next resolving attempt