Friendship is an opaque, organic process. No one understands how to "make it happen." So it pretty much becomes a numbers game. The more people you are in steady contact with, the higher your chances of that process taking hold. Before 30, people are in institutions that provide this kind of environment: school.
Work can provide it as well, if you want it to. A lot of people aren't comfortable with trying the process there because, unlike school, it's really hard to avoid someone if things go sour. For this same reason there's usually a little taboo around workplace relationships.
Then there's the knock effect of having a couple real friends in our youth: all their friends become our acquaintances and maybe even our friends. The numbers game at work again. All these acquaintances make our social circle feel a lot bigger than it actually is. This is what makes the drop off after a certain age so hard. When we look back, it felt like we had so many friends, but most of us really didn't.