Libraries are a great way to manage separation of concerns. Any dependency you add has to be explicit. There's nothing stopping you from adding that dependency but you can't just do it accidentally.
The graph of dependencies between components makes for explicit separation of concerns just like you would have a graph of dependencies between different network services.