Because they knew there was a demon to exorcise. Obi-Wan straight up accepts that there is only Vader and that he killed Anakin, not Obi. That is basically his point of resolution, when all the guilt falls off his shoulders. So there he has him, the emperor's right hand man, who murdered all those younglings, no Anakin left...and he leaves. Because reasons. I understand that him killing Vader would mess up continuity, but it's so, so dumb. A million other ways to force him to leave. Have the Grand Inquisitor show up, damaged Vader and the GI drive back Obi-Wan, force him to flee! The GI decides not to pursue Obi because he needs to get Vader back on the ship to heal him!
I would have preferred that instead of "okay bye now"
It all feels so slapdash, rushed and clunky, it boggles the mind since the Obi-Wan movie was announced YEARS ago. So, so dumb