Well the answer might well be;
a) the figment of the imaginations (God) of the true AUTHORS of the bible was based mostly upon their own desires, needs and personalities,
b) they saw that anyone whose skin colour was slightly different to theirs was a lesser being thus suited only to enforced servitude and to lend credence to that ideology they INVENTED a ' divine' law condoning slavery as well as making women subservient to men and to be regarded as little more than brood mares, etc, and last but by no means least,
c) simply because they were nothing but lazy bastards seeking only to make their own lives that bit richer at the expense of others.