When determining where to place electrons in atoms, three rules are generally used: the Pauli exclusion principle, the Aufbau principle, and Hund's rule. The Pauli exclusion principle, from which the pun is derived, states that no two electrons (or indeed any fermion) can occupy the same atomic state. Therefore, any electron orbital is limited to two electrons: one with a spin, and the other with a − spin. The Aufbau principle states that lower energy orbitals are occupied previous to high energy orbitals. Hund's rule states that electrons will try to fill orbitals individually, and only pair up when every orbital has a lone electron in it.

In the comic, electrons are being equated to people, and rooms (or couches) are equated to orbitals. The reverse of Hund's rule is then followed: people will try to pair up in a room first, and only when all the couples have done so will rooms be allocated to single people. The Pauli exclusion principle here means that only two people can occupy a room at a time (should those people be romantically involved). The Aufbau principle therefore means that more restful rooms are filled previous to less restful rooms.

The title text jokes about drunken party-goers, who ignore the Pauli principle perhaps out of inebriation. They then end up partying and sleeping together with many people in the living room, leaving the roommate stuck in the third desirable location, the hall lounge.
See xkcd.com/658/ for visual diagram of Pauli's Sexclusion Principle
by Bad C dev September 21, 2021
Get the sexclusion principle mug.