I find that, invariably, code that has been thoroughly pondered over tends to organise itself into layers. For example, for most of the code I write, which runs in the shell, there will be:
This list is not exhaustive but I've found it appear again and again. Having layers means that you know where various actions fit in and helps you cleanly demarcate between function and API, which you can then avail to others to hook into.
So, that's the point. Layers are good.