The testes are contained within the scrotum, which is located outside of the body cavity. Why is this location important?