The important thing in all of this, IMO, is simply that the player and DM are on the same page regarding playstyle before the campaign begins. Does the DM allow the player to have input on what goes on in the world other than their own character, or not? To what degree? Can he say that his parent was a war hero, or is he assigned his family? Can he dictate during play how his god does things? Can he declare in the middle of the campaign that the land he came from is a magocracy?
You really have to have agreement on this ahead of time. Take my upcoming campaign for instance. As a DM, my campaign is my character. I design and control it. Just like players can't declare what is true for another player's PC, or dictate their actions, they can't add things to my campaign-character except through the actions of their own character.
Players will have this very clear up front. When they are making characters I will go to great lengths to let them have what they want as long as it a) fits the setting, b) fits the campaign (I reuse a huge setting), and c) fits the party. I'll even go to the extent of allowing characters to help design their own homelands, provided those lands haven't already been clearly detailed and brought into play before. Once the game starts, however, you are interacting with my character, and I will not have its actions dictated to me anymore than I will dictate your character's actions to you.
This agreement even applies to the PCs relationship to each other. If one player wants to play a wizard, and another player wants to play a wizard-hating mage-slayer who is likely to try to assassinate him in this sleep, I'm going to tell them that won't work and we'll see what other characters one or both of them are interested in playing. A party is a shared character that all of the players are participants in, and it must sign-up for my campaign and settings as well as the individual players, or problems can happen.
If there is a question of tenets of deities or alignment, I will ask a player how much detail they want, and explain to them that if their actions end up differing from the permissible norms, their powers may change as a result (ie, subclass changes), they may lose any connection to their previous patron, and there may be in-world consequences. So if they choose to vary from the tenets that they profess to a significant degree, while continuing to claim to represent that patron, others (mortal or immortal) may take steps to make sure the rest of the world knows they are not in harmony with whom they claim to be. I'll also ask my players if they want me to forewarn them when they are moving in that direction. In my case I will avoid "punishing" as much as possible, by changing their source or powers rather than removing them, but like any other character they face in-world social/political and other consequences--no different than a fighter who is a rogue knight, or a rogue who betrays his guild.
As a player I am totally okay with those sorts of things. I try to make sure I am very clear about how the DM runs his world. For instance, when playing a spellcaster I want to know how much of a magic arms race there is going to be: is see invisiblity a trump spell, or are there a whole stream of better invisibility that laughs at your see invisibility and even more penetrating see invisibility that laughs are your better invisibility kind of spells that ascend up the levels. It can be extremely frustrating as a player to play say, a warlock or sorcerer with a limited selection of abilities who chooses see invisibility expecting it to work throughout the campaign, only to discover it become meaningless after a few levels.
However, once I know how the DM runs his campaign, I sign on to play it with those guidelines. I have little sympathy for a player who knows what he is getting into and then gets frustrated out-of-character because things happen exactly the way the DM told him before the campaign that he signed up for. Getting frustrated in-character, well that should be part of the fun for everyone.
One of the benefits of this approach is that once everyone is on board, then I as the DM don't have to worry about their choices. They've chosen a concept that works with the campaign, and can play it as they intend to, and I can have the world adapt as I see fit. If I sign-off on a morally undecided character who is potentially going to go darkside, and the player does, then I should let them, to the limits possible. Of course, if it ends up totally messing up the campaign for the rest of the group, we might want to have a talk about using the polymorph to NPC and create new PC spells, because the DM's character-campaign bears a greater part of the weight than any individual PC. The campaign has to be able to carry the PCs, and if it lacks a firm foundation, it's hard to do that. If you are going for a collaborative campaign creation experience, that's perfectly fine. But as I said, we all need to be clear up-front what we are doing, and I'm rarely playing a collaborate design experience.