Many applications use third-party software.
Third-party software often organized as pluggable functionality
.
Pluggable functionality often implemented not as independent executables but as linked libraries
.
Also when you wrote application
then you often divide it on different functionality
.
The best way in this case (in Dart
) put different functionality
in different libraries
.
This simplify your life when you will be testing
and maintain
your application.
By convention libraries in Dart resides in 'lib'
directory.
Also implementation
of libraries by convention must be located in 'lib/src'
directory.
There may also be other possible explanations for this need.
I just tried explain it to you as simple as possible
.