Originally Posted by
Stickiler
There's two different mechanisms they use to split players up, with one method used on Classic, and one used on Retail.
Classic, Layering: Layers are decided realm-wide, so if you're placed in to a layer, you stay on that layer no matter where you go in the world. Not sure exactly when the layer is decided, but the goal is that if you see players, you should continue to see those same players throughout your play session, regardless of which zone you go in to.
Retail, Sharding: Shards are decided on a Zone by Zone basis, so if you're in a zone, and see a player, you might cross a zone boundary and no longer be able to see that player, as you might be placed in different shards. Shards are also cross-realm, with the idea that you can basically be on any realm and still see a healthy number of players in the world, regardless of the health of your particular realm.
With the system used in Classic, it's relatively common on the smaller servers for you and your friend to be in different layers, even though the zone is dead, because there might be hordes of people in player hubs, near raid/dungeon entrances etc, which have forced the layers to exist, even though those players aren't near you specifically.
On Retail this shouldn't happen, though it does sometimes due to bugs, and it's vanishingly rare in my experience. It used to be more common.