It's all Mariko's own judgement. She know he's a stalker but at the same time, she also knows he's a good person who kept protecting her for a long time. Sota was on the verge of suicide and that's why Mariko told him that she won't forgive him if he disappears. He didn't set these things up and was surprised. Episode 8 will give you more answers.
I'm curious about how they'll find out about the detective evil deeds.