In economics (and other fields) we use the metaphor “black box” to describe a process where we see the inputs and the outputs, but we don’t really understand (or maybe really need to know) what goes on inside.
In the coconut plantation story (or lemonade stand, or apple orchard) we tell to motivate students to think about how production works, we invoke that black box metaphor: labor and capital go in, and output (or real GDP) comes out. When we add a production function, what we’re trying to do is put mathematics on what goes on inside the black box that’s both tractable and economically sensible.
With any luck, this cartoon will make the black box idea stickier for you:
I do want to emphasize that the block box doesn’t necessarily mean better inputs produce better outputs (although most of us believe that to be true most of the time in the real world). In this case, we kept one input the same (labor), changed the other input, and with (what looks like the the exact same) black box produced the same amounts of different outputs. But it could just have easily been different combinations of the same inputs. What’s important is that we don’t need to know more about this to get the point.