Dear student.
I guess you wish to know, Why testis are located outside abdominal cavity?
To produce sperms testes require lesser temperature than the normal body temperature. Thus to regulate the necessary temperature testes are located outside the abdominal cavity and not in the abdominal cavity.
Regards.