Season 1 of Netflix's Master of None definitely painted Aziz Ansari's Dev as a wild child, eager for random hook-ups in New York City as he wasn't sure about long-term romance. It led to a hilarious fling that was, oddly enough, driven by revenge after a bad experience in an ice cream parlor. But while it seems like this was just silliness for laughs, as the episode wraps, it actually offers the show's greatest lesson.

Dev ends up meeting Claire Dane's Nina, a high-end food critic, at a party in "The Other Man," pretending to be her friend after a toxic male pursues her. They hit it off, smoke weed and in the blink of an eye, they're back at her posh apartment ready to have sex. However, Dev pulls out of the fling as he spots pictures all over with her and her husband, Mark (Noah Emmerich). He just can't be someone who encourages cheating and potentially breaks up a marriage.

RELATED: The Circle: Here's What the Inner Circle Is

A few days later, though, at a shop, a man cuts in front of Dev, buys the last sundae and throws it away. The man's obnoxious, bullies everyone around and curses the shop out, all while on a business call. Dev recognizes him as Nina's husband Mark and the episode then cuts to Dev sleeping with Nina out of revenge. It's petty but feels like karma based on Mark's behavior.

Nina keeps tempting him over as she's enjoying their trysts, and while he wants to abstain, Dev's love life is at a standstill, so he keeps falling for it. But one night, Mark's flight gets cancelled and he catches Dev hiding in his closet. It's one of the show's most hilarious moments as Dev awkwardly tries to leave amid the arguing couple, who reveal they frequently cheat on each other.

RELATED: Good Girls: Beth Just Repeated Her BIGGEST Mistake

The episode ends with Dev trying to hide from Nina and Mark after seeing them at a homestore depot months later, but they spot him with his friend Denise and reveal that there's no hard feelings. In fact, Mark offers a PSA on ego, fidelity and commitment, indicating that he's glad things played out with Dev. He's working as a lawyer less, off drugs and vacationing more.

In fact, he's treating Nina right as they explain about the ugly parts of marriage. Ironically, Mark's into wood work now and adds that he wouldn't throw away a table if a leg's broken; he'd just fix it. It enlightens Dev to see them in such a loving, inspiring and selfless marriage, offering advice that Master of None's other episodes didn't touch on much.

It's the best mix of the series, blending comedy and the real world, while also teaching viewers about impulse, consequences, loyalty and that it's sometimes not best to cut your losses and abandon ship.

Season 3 of Master of None will premiere on Netflix in May.

KEEP READING: Good Girls: Annie FINALLY Conquers Her Biggest Demons