Total speculation, but has the following been ruled out?
An external scrotum presents more direct health cues (size, smell etc.) for females wishing to reproduce. This would increase the probability of healthy offspring. Perhaps such an adaptation becomes more likely in animals with a longer reproductive cycle.
I'm not a biologist, so if the above is garbage, a one line explanation would be enough. Thanks.