I mean, don’t get me wrong- the character assassination of Dean (probably so they could introduce the Jess character) is so real and I have a lot of issues with it, but as far as storyline goes, I think her going back to Dean made sense.
She had this tough year, away from her town, her mom, her life. And she was struggling at Yale. She hadn’t dated anyone, people seemed to be moving on without her, she had some academic issues. For the first time in her life, she was behind the game. And when we feel like that in our own lives, we all have a desire to return home again, to things that we know and things that comfort us. Dean was that for Rory, in many ways.
In addition to that, I’m not sure if all of us go through this, but sometimes we break up with our first love (who is, overall, a great partner to us), because we grow out of them, and grow into someone else. In Rory’s case, this someone else was dangerous, unpredictable. He broke her heart (Jess…who is my favorite character btw so don’t @ me). Not only did he leave her out of the blue, but he came back, told her he loved her, left again, then came back, begged for her to run off with him- I mean he got her completely mixed up and backwards! Tie that in with everything else going on in her life during Season 4, remembering Dean and the comfort he brought to her life, it becomes sort of a “grass is always greener” situation. She forgets that she grew past him, and she only remembers the good parts of their relationship. Seeing things through rose colored glasses, especially the past, can mess with your mind sometimes, especially when your present isn’t looking all that great at the moment.
It also made sense for other purposes. As a writer, and with Rory being such a precious character in the Gilmore Girls world, I totally get why ASP wanted Rory’s first time to be with Dean. As a shipper, sure, I would have liked to see it be with Jess, but as a writer, Jess was a terrible choice. It would have been so OOC for Rory to sleep with Jess, especially after what happened at the keg party, especially after, at the end of the day, he treated her so poorly most of the time. If she had slept with him? Those repercussions would have been huge for Rory, and affected her in a way that would have completely changed the trajectory her character was going. Rory needed to be strong when it came to Jess, because she needed to grow. She started as the girl who let him walk all over her, and she ended as the girl who was able to say “no” to him, when he came calling. That was character growth, and that was important. Do I think when he comes back in S6, they should have extended his story and she should have slept with him then? With that version of Jess? Yes. Absolutely. But the writers didn’t want to wait that long for her to lose her virginity, they were being pressed to write it into the show so, Dean was the logical choice. It was either him or some rando, so…enter Dean.
Rory also needed to grow in the sense that, well, she really needed to fuck up. Yea, she kind of fucked up when she kissed Jess at Sookies wedding, but it was the end of S4, she was 19/20, in college- it was time for her to make a big mistake, especially because she had made so few up until that point. In order for her character to move forward anymore (especially towards where ASP wanted her to go), she needed to become flawed. Seriously flawed. Sleeping with a married Dean also set a continuity in motion for all her relationships. The irony of her character became that while she was so great at what she did academic wise, and while she was so sweet and loving to her friends and family, she was absolutely terrible in romantic relationships. She was super insecure, super flighty, she made terrible choices. And eventually, this spilled over into the rest of her life, as well.
Lastly, again, it just was a good pick for her to lose her virginity to Dean. Being 19, being this beloved character, it’s sensible to put her with someone who genuinely loved her (albeit unhealthily sometimes) and gave her comfort, someone who made her feel safe. It also got to show the other side of things, what happens after you make a mistake like that. Thankfully, they wrote her doing this horrible thing with Dean and then actually made her pay the consequences. The other shoe definitely dropped, and when the dust settled, her repercussions became clear. She realized maybe things weren’t as perfect as they seemed. She ruined a marriage, gained a reputation, had a terrible time attempting to reconnect with Dean, etc. Again, grass is always greener. It was closure to the Dean character that was never really given in S3 because there was always a “will they/won’t they” get back together vibe, even with Jess around. After they tried again as adults and the spark was completely out, they realized they “couldn’t ever really go home again” (recreate the past) and understood it was finally over, that chapter was finally closed (something they never did with Jess, which is again, why he is meant to be her endgame so give us another revival ASP wtf).
Addendum: I am a Jess fan, I think she should have ended up wth him, I think he should have been more present in later seasons, as a fangirl I hated when she said no to him when he asked her to go away with him, and I wanted to punch her when she kissed him and then said “I love Logan” in S6, Literati is my everything and always will be, but from a storytelling perspective, these were good choices that made sense for the world ASP created.