This causes when an object was loaded /created using data loaders. For example I have created a model 10005 as model id using data loader. Now when we try creating a model using GUI, for example it starts with 10000 as model id, second time when I create new model it increments to 10001 and so on . Now if I try creating a model to after 10004 the system increments to 10005 whereas we have already created 10005 using data loader.
Hence unique constraint error takes place. Best practice while creating objects through data loader is avoid integers and prefix with alphabets, for example M10005 or M-10005