Or when there was a body in the library the puzzle of how it got there kept yielding satisfying surprises.
When I got a little older I started to notice and realized this was a Bad Thing. And when I started writing I figured this was a thing to avoid. How does the writer make a character out of cardboard? We don't run into cardboard characters in real life.
Take a couple Air Force officers that I know. She isn't all spit and polish when I see her camping. Or her husband who she outranks who flew a fighter-bomber. He's a lot more of a dairy farmer in him than warrior. In fact, if you didn't know he was retired Air Force you might just think him another Ag prof at Moo U.
Cardboard characters do one thing. The detectives detect; the cowboys cowboy; the pirates pirate.
The people you know in life do more than one thing. It's human nature. And we remind ourselves, "All work and no play make Jack a dull boy."
Take a look at your work in progress. Have your characters had a chance to get out and let their hair down? You should give them hobbies, families, and distractions.
Sure you've got this robot like guy in a scary black robe who sounds like James Earl Jones. He must have had a family and a childhood. OK, bad example. It's a bad example because none of that oh-so-elaborate backstory that Lucas built into Darth Vader shows up in the character's words or deeds. Except at the end. Luke is being killed by the Emperor to create a Dark Moment. Then something unexpected has to happen to save the day. Maybe Han Solo can come out of nowhere in the Millennium Falcon? No. Did that already. OK. We'll have Darth Vader act like a real father for the first time in the entire series. Dude, even when you're being a dad you're working!
It's contrived and lame because it serves the needs of the story.
Like I said, s/he can have a hobby. Or a family. Or a distracting neighbor. This makes the character of an archetype and more like someone you'd meet in real life. Your characters should be just like the folks you'll meet in the next campsite. Or know from PTA. Except they're in your story.
You need to give your characters a break. They need to take off time from advancing your plot to deal with a kid who's home sick from school. Or catch up with their macrame. Just put them in a situation where perhaps they WANT to be advancing the plot, but cannot. These breaks in the action are the most scaffold-like prose you can write that you can put into the narrative.
Scaffolding should hardly ever make its way into a your writing. No, you shouldn't write a prequel--or three--just to establish a black-clad robot guy's backstory.
I'm not suggesting you bloat your work with a bunch of irrelevant rabbit trails you send all your characters on. You have to be a bit intentional here. The plot has needs, and so has the reader's perception of the characters. If I've convinced you to give your characters a break, you should think about why they're taking this break in the middle of your plot.
Perhaps it is to establish a key attribute of the character's nature. Maybe she's fastidious, or maybe he's kind to animals. These are excellent little fillips to add without bloating your work. These are easy fixes you can add after an editor tells you that a character is in some way lacking a desired attribute.
Another reason for your character to take a break is to insinuate some trivial detail that you're going to use to unlock the Big Problem at the work's climax. Let's say your detective has to drop off her kid at a friend's house for a sleepover. Your detective may be trapped in a boring conversation with the friend's mother. As her attention wanders she notices barbed wire mounted on a display. The dad collects the stuff. Perhaps the solution requires the detective know something about barbed wire. Now we know who she's gonna call.
The trick is in making it not seem contrived. If the ONLY thing your detective does that is not detecting is that barbed wire scene, then your reader will think, "we'll see that again," and she'll be right! Your detective will have to do more than one kid task. And your detective will have to notice more than one oddity. Perhaps in those instances, she'll have a cell phone in hand and be advancing the plot.
The more seamlessly you can mix plot-advancing and character-deepening the better. Life does not come to us neat, but is a cocktail of diversity. We work, we play, and we have extraneous obligations all mixed up. If you make it that way for all your characters, nobody will complain that they're made of cardboard.