Excluding medical abnormalities which hinder kids' ability to perceive discipline:
It's parenting.
How do I know? I had kids late in life. I watched numerous loved ones with huge families raise myriad "types" of kids from very easy to very difficult in the same, firm, loving style, and ALL of the kids were spirited and delightful, well-behaved rambunctious, loving kids who do not act out except for rarely and then there are consequences. Are they unique and wild too? Yes, but controlled when they need to be and never terrible. Many of them are now raising their own wonderful large families the exact same way, and the results are the same. For poster feeling that never spanking should have insured great behavior, none of these kids would have acted as well if they were NEVER EVER spanked. The tough ones would have been a mess without a select stung butt here and there. Children who are so mild mannered that their behavior is great with only gentle consequences (or none at all which is trendy now too) for things are very rare.
I've watched other types of parents use different ways, yet similar to each other...and ALL of those kids have the exact same common misbehaviors from pretty annoying to downright terrible. Their parents may be loving and nice, but the permissiveness never leads to great behavior. NEVER. And anything not succeeding in stopping wrong behavior is being permissive. Same with overly angry or stifling parenting. Almost never a good outcome. And when people are inconsistent and only sometimes blow up and discipline, but other times they ignore....the kids act badly. Anyone who has spent lots of time with kids has seen the patterns and the outcomes.
With what I saw with my own eyes in people I knew I chose to emulate the parenting I had seen succeed. My results are consistent. Discipline and love DO work even though some kids (my third) are much tougher than others...they just need more work.
No one in their right mind judges a kid or parent on one bad episode or two. We all know there could be reasons for a bad day. We all know some kids are harder than others. We all know the kid screaming that he hates his mom in the store may have a medical disorder...I personally never give dirty looks or make comments.
But we all also know what bratty and spoiled looks like and what ineffective parenting looks like. None of it is new. There is a sentiment tossed around that "kids don't come with instruction books". In actuality, humans have been breeding for centuries and there are very consistent results to various parenting styles for those who look.
I think it's 100% parenting up until about age 5....about 50% parenting and 50% nature from age 5 to 15, and probably very little about parenting after age 15, though teens with loving and firm parents seem to fare better usually.