The chicken or the egg? Or the game and everything else? Or maybe, the quest versus the world? Is there a definitive answer to something like this? It’s hard to know for sure, but its something to think about.
For example, I often run games for people new to Pathfinder. One of things I try to ensure is that learning the game comes first. I like to try to work my way through the rule and ensure that everything players might want to know is covered at some point during the game. That’s it.
What isn’t there is a specific quest, or anything else. I have to make this stuff up to suit my needs. So, when I play the game, since most people don’t have too much material, setting the game in Golarion, Pathfinder’s default setting isn’t very useful. What I find much more useful us making something up to suit my needs, as well as those of the gamers.
The environment needs to suit the needs of the game. As GM, I need to make sure the environment I’m incorporating into my story suits my needs to the utmost, and so most of what I use is my own design, but heavily influenced by Pathfinder. One way of demonstrating this is by creating my own cities. I can make a town to suit my needs. However, to keep the flavor of Pathfinder I might do something like add a church or two from deities that would be found in Golarion. In this way, I can keep my game close to the world created for the game I’m playing, but use a completely different environment.
As noted in the opening paragraph, there isn’t a clear answer to this. It’s also the kind of topic I’ll revisit from time to time. Whatever you do, have fun doing it.