The Witcher: Can someone explain what the "Law of Surprise" is?
Warning: this post contains spoilers!
If you aren't familiar with the books or the game, the "Law of Surprise" may come as a bit of a surprise to you in the Nextflix series.
In Episode 4 of The Witcher ("Of Banquets, Bastards and Burials"), the Law of Surprise is first mentioned when a masked knight claims the Law of Surprise to request the Queen's daughter's (Pavetta) hand in marriage, as he claims years early, he had somehow saved King Roegner's life. To repay Duny, the King had offered him the Law of Surprise. The series doesn't go into detail on how he had saved the King's life.
The law can take different forms, but basically dictates that one is expected to offer someone who saved their life a reward of sorts, but one that unknown to both parties. The law can be given as "The first thing that comes to greet you when you return home" or as "What you find at home yet don't expect", which often takes the form of a firstborn child.
After saving the King's life, the King promised Duny, "Whatever he had left at home without knowing or expecting it", which turned out to be his daughter Pavetta. Duny thusly tried to claim Pavetta's hand in marriage much to the Queen's dismay, as she was hoping to strategically marry Pavetta off to aid her own causes. After a short battle where Geralt saves Duny's life ensues, the Queen reluctantly agrees to allow her daughter to marry Duny, realising that she can't win against the Law of Surprise, which in the Witcher universe has a sort of fate-magic tied to it bringing ill consequences to those who don't pay their dues.
Ironically towards the end of the episode, Geralt claims the Law of Surprise for his own boon after Duny insists on repaying Geralt for saving his life in the battle. This is where Princess Ciri becomes fated to Geralt as Pavetta was already pregnant with her, unbeknownst to Duny at the time.