It's not uncommon for shows to to an episode where they dive into a side character. Within the world of "Crazy Ex-Girlfriend" we've known who Nathan is since he showed up, and we know who Maya is too. But this Nathan realizes that Rebecca loves romantic comedies and that perhaps by watching some he could learn something works on a number of levels. First, learning about something the woman you profess to love has loved and tried to share with you all along well after the fact is in itself rom-commy. As is dreaming about the thing. Obviously totally happy and functional couples have interests the other doesn't (see also, water parks, but I digress). But Nathan wasn't checking out rom-coms to see if by dismissing an entire genre of film, he had missed out on something he might enjoy. Nathan was looking for research he could use to hijack his way back into Rebecca's life, much the way he had thought about using the diary that her half brother had used. He was, in fact, using season 1 (and yeah, okay, the other seasons too) Rebecca behavior. In prior seasons, Trent had been the mirror for how over the top Rebecca's behavior was. But Nathan also had a lot to learn about being appropriate.
So, dream Nathan and dream Maya fake dated in order to make both their exes jealous and in a testament to the wonderful writing and acting in the show, by the time they got to the building karaoke scene, even though I knew this was a rom-com set up, and I still knew there were lots of reasons Maya and Nathan were not the appropriate choices for each other, I was kinda ready to buy into it.
It was a dream, so we don't have to worry about if Nathan is still technically Maya's boss, or the other various power differentials that make this a bad choice. Instead, we got a dream rom-com. But that episode also served as a reminder to both the viewers and to Nathan, that it's easy to get swept up in the moment, it's easy to feel like all the forces of the universe must be behind you. It's easy to justify a long line of terrible choices in service of one good ending. Nothing is ever perfect, but that doesn't mean that bad behavior should be rewarded, even when people sing delightfully about it.