I have followed jenkins extending pipeline with shared libraries
it was mentioned that
The src directory should look like standard Java source directory structure. This directory is added to the classpath when executing Pipelines.
while the vars directory hosts scripts that define global variables accessible from Pipeline
Note: I am more curious about the difference in usage not in implementation.