I thought Dean said "I have to go back" and get Sam's body, but he said "we." And it's possible that he decided this all on his own, that Cas (and maybe Gabriel too, but maybe not) was going to go with him and retrieve Sam.
(Or maybe not Cas. Maybe he blamed Cas for him leaving Sam there in the first place.)
But it's also possible that they discussed it on the way to Dayton. It's possible that they finally pushed their way out of the tunnel (Dean trying not to remember how Sam held that massive door open for all of them when they went in), tumbled out into the muted AU landscape, and stopped to let their eyes adjust to the sunlight. And maybe he said it then and there, or maybe Dean walked, stony-faced, for several yards, ignoring the concerned looks from Cas and Gabriel, and especially ignoring Maggie, because if Maggie wasn't there, if Maggie hadn't been in the tunnel, if he hadn't been rescuing Maggie... maybe that's the point where he stopped, turned around, looked back to the tunnel and said "We can't leave him in there."
Cas touched his arm. He'd been right there beside him, like he was waiting for him to collapse or run back into the burning building or something. "Dean, I'm so sorry. But we don't have time. We need to keep moving."
"We can't leave him in there, Cas!"
Maggie flinched, and for the first time Dean noticed the tracks of tears down her dirt-smeared cheeks. Maggie lost somebody too. Dean didn't care. Couldn't care. Didn't have enough of a heart left to care about anyone else's loss. But he brought his voice back down to don't freak out the civilians levels. "We can't just leave him in a goddamn vampire's nest. We've gotta get him out of there. We have to give him a..." He stopped and put his hand over his face. Because the end of that sentence was funeral. They had to give Sam a hunter's funeral.
Cas grabbed his shoulders and turned Dean to face him. "We will, Dean. I swear we will. We'll come back and take care of him." Cas's face was tear-streaked as well. "But right now we need to get to Jack and Mary."
(Gabriel looked away. Dean wondered how entertaining it had been for him to watch as he died over and over again. To watch Sam experience that, experience this, over and over again. Maybe that's when he decided Gabriel wasn't coming back with them.)
Dean nodded. Cas was right. Sam would have wanted them to push on, to rescue Jack and Mom. So they pushed on.
(Cas made them stop when Maggie needed to rest. Dean wanted to walk off without her, leave her there to her own defenses, but Sam wouldn't have done that. Sam would have stopped for her, just as Sam would have died for her, just as Sam would have died for all the Maggies of the world. Dean was tired of the Maggies of the world. The Maggies of the world were supposedly Dean's purpose in life, but he never wanted to see a Maggie again. The fucking Maggies were the reason Sam wasn't there.)
When they finally reached Mary, when they saw the camp, when they saw that she and Jack were safe and free and protected, Dean thought We could have taken the extra time. We could have gone over the mountain pass. You would have been fine. It was a traitorous thought, but he allowed himself to think it, because it was the only thing that allowed him to squash down a worse thought. If I had known, I wouldn't have come. If I had known I'd lose him, I would have chosen not to save you. He loved you both so much, but I would have left you here forever if I'd known.
And then he had to leave, because Sam was cold and alone somewhere in a goddamn vampire den, and that was the one fucking thing in this godforsaken world that he could fix.
(I'm still not over this episode.)
(I am still blissfully ignorant regarding anything about 13.22. Please help me stay that way)