I'm reminded of the British royal court post "groom of the stool". The groom of the stool was literally the guy who wiped the King's ass. It was a highly coveted position, as you had private audience with the king during his most intimate moments.
Thanks, I forgot to mention sankin-kotai. It was also set up as a way to prevent the daimyos from amassing enough money to build up an army - they were supposed to spend lavishly along the entire route between their residences and Edo.
Japanese developed clever formal court system (Sankin-kotai "alternate attendance") where half of the daimyos were kept hostage in the capital city at all times. Spend year in your own lands surrounded by your own men, one year as hostage in the capital that was under the control of the shogun. If daimio left the capital, his wife and heir were kept as hostages. All these daimios and their close families needed something to do to make their life meaningful. Same applied to their underlings.
King Louis XIV had similar system for the same reasons. Nobles had to keep hostage in his palace at Versailles and they needed things to do. The court system developed bullshit jobs for nobles, like helping him into the bed or taking part of the party. Everyone was given a role to play.