The whole idea is based on the network's request that Jerry and Elaine get back together. Larry was against it but, fearing cancellation, he eventually relented and decided to use one of his personal experiences (he says so in the DVD interviews) for the storyline: after seeing an adult channel on TV (a random event that also spawns some priceless input from George), the former couple ponders whether to resume their relationship. Following some serious discussion, they strike a "deal": they will mix "this" (their friendship) and "that" (sex), meaning they can sleep together but not become romantically involved. No phone calls, no cuddling - just emotionless sex. Needless to say, this will cause problems.
One of the show's most unlikely set-ups becomes one of its best moments: The whole conversation about "this" and "that" is one of Larry David's finest achievements as a screenwriter (surpassed only by the "Master of your domain" jokes in Season Four), as is the unusually sweet epilogue, which some might find too moving for a show that made its lack of sentiment something to wear with pride. But maybe that's the point: ending it any other way would have been predictable by Seinfeld's standards, so an old-fashioned, heartfelt conclusion turns out to be the boldest narrative choice of the entire episode. It's also funny as hell.
If a complaint has to be made, it's regarding the fact that The Deal's events didn't affect the third season in terms of continuity. Oh, wait, hang on: continuity and Seinfeld? Forget what I just said: this is a comedy classic from start to finish - don't miss it for anything in the world.