In parts he is also here so Master Peck can’t get him and blame him for everything.

↓ Transcript
<Katharina is talking to Jester Book, who is behind bars in a cell>
Book: KATHARINA! It's so good to see you!
---
Katharina: JESTER! How are you doing? I still can't believe YOU'RE in jail and Lady Violet is still FREE ...
Book: Well, technically it is "PROTECTIVE CUSTODY" I think ...
---
Book: After all I'm giving the Captain a LOT of leads to go on ... which I probably SHOULDN'T discuss with you or she'll get mad at me. Sorry.
Katharina: Is she treating you well?
Book: Oh, it's fine! Don't worry. The food is alright and I'm allowed to read a lot ...
Katharina: ... but you're still in a cell.
Book: Yes ... but that's mostly for my protection. She's worried someone might come to GET RID OF ME. Which is ... not an UNWARRANTED concern.
---
Katharina: I ... you're taking this surprisingly well. You could've just ... LEFT TOWN after we came back from the jungle.
Book: I am not sure that would have gotten me out of Lady V's reach ... also we have established that I do have some responsibility in the whole thing, didn't we?
---
Book: And frankly: I just couldn't leave you alone with this whole mess, Katharina. Or ... leave you in general.
<She smiles a bit>