Sufficiently well-organized places to not have robbery bands internally or raiding parties externally would, in absence of wars, often be big exporters of mercenaries.
The problem has been exacerbated in recent years because of limitations on how many children couples could have, but a lack of financial resources could also place pressures on people to have fewer children, and make as many boys as possible. But this is certainly not "just" a modern problem created by modern abortion technology.
"Son preference is traditional in Chinese Confucian patriarchal culture" ... "China implemented its one-child policy from 1979 onwards" ... "Given strict family-size limitations and a preference for sons, girls have become unwanted in China because they are considered as depriving the parents of the possibility of having a son" ... "About 37–45% of China's missing females may have been missing at birth [due to Sex-selective abortion]", and other factors include infanticide, poor nutrition leading to poor health conditions, and under-registration.