It was a big theme. The sorrow and solitude. Essentially, you'll be sorry if you're lonely. Thus Naruto tries everything he can to not be lonely. Works out nicely. Unless your Sasuke which means you loneliness gets you everything -_-
I haven't read/watched the ending yet, but I read something and from the sounds of it, and if I'm wrong about it, please tell me, but don't spoil the ending for me!
Spoiler for Hidden: