If your diagnosis of his purpose is correct, it just highlights the shit of D&D's writing. It shows they think "hey so all we need from Stannis is Mel at the wall and a dead girl, so yeah that's great now we can botch everything else involving him and call it a day."