The Kingsguard are something of a pastiche between your Royal Guards (think the guys in the giant bearskin hats) and various historical orders of knighthood: the Knights of the Garter or the Knights of the Golden Fleece.
They tended not to be the best soldiers per se, but the most disciplined, because you wanted them to be on their guard to defend the person of the monarch. Hence why Royal Guards “may not eat, sleep, smoke, stand easy, sit or lie down during your tour of duty.“