In the past your community was little more than those people around you who shared your world. Hunters on the plains, a village by the river, perhaps a group of villages. All of these people needed to have rules that govern their lives, not necessarily written laws, but at least rules that were codified for communal living. Typically, these guidelines for brutes (because if you need guidelines on common courtesy, say Do Not Kill, you're a brute. point final) were entwined with religious beliefs. Thus, religious law which governed the spiritual also governed the secular, or legal laws.
The growth of communities allowed people who dissent to form larger groups. If I believe Zog the caveman is the messiah, convincing Grak and Shmrug does not a new religion make. However, get a whole bunch of people convinced that Jesus/Mohammed/Voodoo Man is an emissary of God and you can start a movement. These kinds of shifts require large groups of people moving in the same direction. Only the development of agriculture could allow people to gather in such large numbers and enable them the luxury of a group philosophy.
Today we have cities with popluations in the tens of millions. Each and every possible culture, belief, hobby, cult of personality can find a threshold of people willing to join in and support the cause. When millions gather, communities will bloom in such a way that puts photoplankton to shame. Any personal philosophy that has an appealing hook, be it "Reggae for God" or "SUVs are cool", will propagate into a pool of millions and take root. The stronger memes will flow easily from city to city, the weaker ones either grow slowly or get choked out by stronger memes.
Essentially, cities provide a fertile ground for an ecology of philosophies. As global interaction grows and physical distance becomes essentially erased, there will be a single ecology made up of varying parts. Currently each country is an individual host, though cities still maintain some independence. Long ago the city state was as large as the single ecology could get. It is not impossible to envisage the internet (in some future form that would be little more than science-fiction to us) as the final community ecology. This single massive environment is weaker than multiple very-large ecologies. The only redundance to it is the parallel worlds of virtual and physical. This should sustain and grow us as an evolutionary form but I worry that we might stagnate.
Normally, I have little but pity for those who erect barriers in the path of inevitable homogeneity, trying vainly to stop a lava flow with palm fronds. However, I can see a time when this instinct becomes beneficial in that it can slow mergers that are harmful. Cities will continue to grow, countries becoming cities and isolation, that inestimable breeding ground of ingenuity, will disappear. So that the final result is that while there will be more room for more marginal philosophies, the rate at which they are born and the novelty of their scope or focus will diminish.