The benefit isn't so much that you can be friends with your neighbours, but that the density makes all distances shorter and by extension your friends are still much closer.
In a suburb many of my friends would be 15+ minutes away by car. In the city I live in now (almost entirely apartments/multi-household buildings), almost all of my friends are within a 15 minute walk. It has been a massive improvement to my social life, mostly due to the ease at which gatherings can spontaneously/easily occur.