That's a good question, my answer would be that my setting and mechanics alter each other and I just watch them to make sure they don't alter into something I don't like.
I'll come up with a setting and then I'll think about what mechanic I would like to use. I'll try it out in my head and see if anything unexpected happens. If it does, is it good unexpected or bad? Bad unexpected means I need a new mechanic. Good unexpected is great. Then I talk about it with my playtesters and we debate what effect it will have on the game. Again, you get the same vetting process.
Sometimes the good unexpected is so good, I alter the story to fit it.