A good, confident writer (or storyteller of any stripe) challenges the reader. Such writers follow the characters where they insist on going, and don’t give the reader much conscious thought.
Good storytelling isn’t about happy-go-lucky people who never have a problem, or bad guys who always get what they have coming to them. On the other hand, when bad things happen to good characters, there’s got to be bedrock underneath. The character will suffer whatever it is you have planned for him or her, but you have to build a scaffolding before you open that trap door.
Later in the creative process the writer’s beta-readers or agent or editor may raise some concerns, using terms like character motivation and suspension of disbelief and readers who take offense at characters who fuckety-fuck their way through a novel. A sensible writer will at least consider reservations that come from trusted sources, but s/he won’t be railroaded.
A writer who is still honing basic skills might have trouble telling the difference between useful constructive criticism and mealy-mouthed nitpicking. Learning to understand, make the most of, and provide constructive criticism in return is an extremely important skill that I emphasize in the classroom, and in one-on-one sessions.