"Shadow" is the episode that takes all of the little hints and bits of information about Dean's character from earlier in the season, and puts them together to give the most explicit picture up to that date of what makes Dean tick. Not surprisingly, the two most important points in the picture are Dean's relationship with his family and his commitment to hunting. And of the two, hunting seems a lot saner and healthier.
The episode gives us two emotionally climactic scenes: the conversation between Dean and Sam just before the boys go off to the warehouse to confront Meg, and the reunion with John. Even before we get that far, though, we get a few smaller, lighter scenes that foreshadow the big drama. At the start of the episode, we see Dean teasing Sam about being a "high school drama dork," and recalling with nostalgic amusement the time Sam was in a school production of Our Town. This fits in with the season's overall picture of the boys' childhood: young Sam tried to do "normal" things whenever possible; young Dean didn't do these things, but he was there to watch and applaud (and mock, no doubt) while Sam did them. It's also notable that when childhood reminiscences come up, Sam tends to remember the negative experiences while Dean focuses on the positive ones.
Later, when Sam and Dean are trying to drum up information in a bar, Sam accuses Dean of chatting up the bartender for her number. Dean protests that he's a professional before sheepishly producing the phone number in question. The exchange is played as a joke, but it's not the first time Dean speaks of himself this way. Throughout the season, he repeatedly refers to himself as a "professional" and to hunting as his "day job," "career," or "the family business." Some of the references are jokey, some are serious, but the repetition leaves me pretty convinced that this is Dean's real view of himself.
Then Meg shows up, and immediately lays into Dean, accusing him of dragging Sam around against his will and treating him "like luggage." Her words seem to be targeted at Sam -- she badmouths Dean some more even when he's out of earshot, and it comes across very much like the "my family won't let me live my life" spiel she gave Sam in "Scarecrow" -- but it's Dean who's most affected. (Sam know that she's talking bullshit, and is already suspicious of her anyway.) As soon as they're alone, Dean confronts Sam, angrily demanding to know if Meg's accusations are true, and why the hell was Sam bitching about Dean to a total stranger. Some viewers, in the wake of this episode, have argued that Dean selfishly desires to keep Sam in the hunt against his will, but this scene seems to deny that interpretation. Dean is visibly hurt and outraged at the possibility that Sam is accompanying him unwillingly. I think Dean would get no joy out of dragging a miserable Sam around against his will, and I think Dean knows this.
In a way, Dean's subsequent (and rather crude) determination to set Sam up romantically (or at least sexually) with Meg comes across as an attempt to reaffirm this denial. "See?" he seems to be saying, "this is me encouraging you to go out and have fun and take a girl out to a poetry reading and get laid, even if she's been a bitch to me. Because I'm an awesome big brother and I'm totally not interfering with your fun or keeping you from having a life, right? Right?"
All of these scenes are interesting in themselves, but they mostly function as the setup for the episode's first big moment -- the conversation that takes place as the boys arm themselves for what they think will be the final confrontation with Ceiling Demon. Now, I know that many viewers felt that the conversation was OOC for Dean, that he revealed too much of himself too easily given his usual vaunted contempt for "chick-flick moments." It worked for me, though, and the reasons it worked go way back to "Scarescrow."
See, I've always thought that Dean had misinterpreted (possibly due to wishful thinking) Sam's words at the end of "Scarecrow." Sam was saying that he intended to stick with Dean for the duration of their quest to find John and defeat Ceiling Demon. But Dean took it to mean that Sam was staying for the long term, that he was committing to the hunt (and to Dean) for good. For a while there, Dean had genuinely believed that he could let go of one of his biggest fears -- Sam was not going to leave him again. Now he abruptly discovers, from a remark that Sam just casually drops into the conversation as if it's not even important, that Sam hadn't changed his mind at all. Sam is still planning to leave when this particular hunt is over. And at that moment, both Sam and Dean believe there's a good chance that this particular hunt will be over that very night. So not only is Sam talking about leaving, he's talking about leaving real soon now. From Dean's point of view, he can't afford to be stoic and repressed on the subject anymore. He doesn't have time. He has to say his piece now or not at all.
Even then, Dean doesn't say anything until Sam asks him a direct question. I'm pretty sure that if Sam hadn't asked, Dean would've kept his mouth shut. But Sam did ask, so what could Dean do? He hates lying to people he's close to (as opposed to strangers). He knows that Sam doesn't deal well with refusal. And at that moment, I don't think he had it in him to manage the sort of snarky, humorous evasion he normally uses to mask his feelings. So he went for the only remaining option -- he actually gave honest answers to Sam's questions.
In response to Sam asking what Dean plans to do when "all this is over," Dean's response is, "It's never gonna be over. There's gonna be others. There's always gonna be something to hunt." This is what all that talk about the family business and being a professional comes down to. For Dean, hunting is not a quest that will end when one specific goal is reached; it's his life's work. He's not just hunting because a demon killed Mom; he's hunting because evil is out there, and will always be out there. Dean's not going to stop hunting after killing one demon any more than a firefighter would put out one fire and say, "okay, I'm done now."
Now, Dean's dedication to hunting really doesn't qualify as a problem or a character flaw. Sure, it's a risky, dangerous job, but he knows the risks and knows how to cope with them. He likes hunting, is good at it, takes pride in it, finds meaning and personal satisfaction in it. So, not a problem. The problems start when Sam asks what else Dean wants for himself. Dean's answer is immediate -- he doesn't want Sam to leave. He wants Sam to keep hunting, and John to come back, and the three of them to "be a family again." And as far as Dean is concerned, being a family means staying together -- living together, traveling together, working together as one team. He can't accept, or even fully understand, the idea of people living separate lives, doing their own thing, and still being a family and loving each other. To him, the only alternative to togetherness is abandonment. This isn't too surprising. After all, Dean's life hasn't exactly provided him with many examples of maintaining relationships at a distance. When Sam left, he broke off all contact. When John disappeared, he broke off all contact. And Mary -- well, you can't break off contact any more effectively than by dying, can you? In Dean's world, people are either right there next to you, or they're gone. No wonder he's terrified by the prospect of Sam going back to school.
So no, Dean's reaction is not surprising, but it's not healthy or realistic either, and it can't bring him anything but unhappiness. Dean's ideal image of one tight-knit family working together will never happen. If it ever existed at all, it must've been years ago, when Sam was too young to want out, when John was the undisputed leader of the Winchesters. But Sam is an adult now. Even if he does decide to keep hunting, it won't be the same, because Sam will never willingly submit to his father's authority again, and because however much Sam and John love each other, they're the sort of people who'll never peacefully coexist in close quarters. Deep down, Dean knows this, even without Sam flat-out saying that he doesn't want things to be the way they were before; he says it himself in "Bugs" when he predicts that Sam and John will be at each other's throats even if Sam finds John and apologizes. But for the time being, Dean's need for family and his fear of being alone get in the way of his acceptance of the true situation.
And for a brief time there, it actually looks as if Dean's going to get what he wants. John reappears, alive and well, and he and Sam appear to reconcile. Dean's face as he watches his father and brother hug is so full of hope, it almost hurts to watch. Whatever might happen in the future, whatever Sam might still want, at that moment all the Winchesters are perfectly slotted into Dean's idea of what a family has to be. It's all he's ever wanted, and it lasts for all of thirty seconds before the daevas attack. In the end, it's Dean who breaks up their newly reforged family bond. He'd just seen John walk into a trap for his sons, and he won't risk it happening again. So Dean let's him go just as, eventually, he'll have to let Sam go. After all, you can't be a family if you're dead, and for Dean family always comes first.