The Emperor tests potential government workers with something completely unrelated and ridiculous to get the job,
"This diversion is only practiced by those persons who are candidates for great employments, and high favour at court. They are trained in this art from their youth, and are not always of noble birth, or liberal education. When a great office is vacant, either by death or disgrace (which often happens,) five or six of those candidates petition the emperor to entertain his majesty and the court with a dance on the rope; and whoever jumps the highest, without falling, succeeds in the office."
I think the Emperor was looking for entertainment at the expense of the applicants. He also wanted to see just how far someone would go to follow his orders.