Whitman is the poet of democracy, and friendship is the one truly essential ingredient for a democracy. He wasn't the only one to realize this. His contemporary and literary inspiration Ralph Waldo Emerson wrote extensively on the subject of friendship, as did the philosopher of the original democracy in Ancient Greece, Aristotle. In "Song of Myself," Whitman addresses the reader like a close friend, and his tone is reassuring and non-judgmental. He wants to get closer to everyone he meets, to hug them and kiss them and provide them with a shoulder to lean on. He is eager to become fast friends with any kind of stranger.
Whitman's list of friends and companions excludes, or at least subordinates, all those who do not work outdoors or with their hands.
The speaker of "Song of Myself" believes that erotic desire, rather than intellectual or moral compatibility, is the root of all friendship.