We are a barely literate society. Our public documents and periodicals are consistently maintained at the 7th grade reading level. If you have enough barely literate people writing novels [because it's profitable to do so], you're going to get exactly the type of sudden character idiocy that this thread is discussing. The authors in qustion take the classical formula, which pervades fiction from the last three thousand years, and follow it blindly and without comprehending its narrative purpose.
It's not [always] just people changing a character to make the story work.