It is rude to ignore a friend of yours.
Dwight is at a party talking with some popular people when his less popular friend Joe tries to get his attention.
Dwight wants to decide between his friend and advancing his social status.
Dwight tells the group that he'll talk with them later, then goes to his friend and spends some time with him.
Dwight makes a joke about his friend to the popular group and continues talking with them.
Dwight's friend feels welcomed and important, boosting his self-esteem and helping him socially.
Dwight's friend stays away from him and feels left out and dejected.