One of the things in Karlach's storyline in this fanfic that I'm kinda using the prologue to explain is that her dream visitor is the form her mechanic uses when he's working on her. It's not what he actually looks like, but Karlach didn't flinch when he spoke in it, so he kept wearing it.
And I won't pretend this small kindness was a sign Bel is secretly good. There was absolutely a selfish motive behind ensuring Karlach was relaxed when he ripped her heart out and put an infernal engine in its place, but the choice stuck with Karlach, and that's the important part.
Karlach knows it's stupid to trust an archdevil, but she also knows Bel has literally held her heart in his hands–both the engine in her chest and the flesh one it replaced. He doesn't have her under contract, he won't hurt her, he specifically chose a form that made her comfortable. He does not care, but he has taken care of her.
That's why his mechanic form is her dream visitor.