Hate to be the Ackchually guy but usually the Jester was appointed from the topmost, or second highest ranking noblemen from the kings court - the job needed a lot of guts, an S+ ability to read a room and sharp wit to keep both your job and your head. Even more, the king needed to have supreme trust in you, because that was pretty much the only way to be certain you weren’t making fun of him.
I think jesters were important because they counter-balanced all the rest of the yes men that tend to wiggle their way into the halls of power, and tell the king straight up if some plan or idea was garbage.
I wish I had a source to put here, but this is from the memory of some youtube video that had some good sources. Hopefully someone else can drop some sources.