In Imperial China, one of the important tasks that the emperor needed to do was to ensure the continuation of the dynasty, which was achieved by the production of a male heir. For this purpose, the emperors of Imperial China kept an enormous harem of women.