We use library in the same way as a function in general programming.
As one of my teachers taught me: A function should be cohesive and independent.
And library fulfills that perfectly when using as Exec.
Two days ago, I had a SA which generates a zip of images. I then had to use the exact same logic in another SA. So I moved (manual JSON copy paste) it to a library, and called them via Exec step in both the places.
The original SA now just has one exec step.
Using library SA via Include method is also a good option, but not something that I use frequently. The use case here is more like a server side include or a partial.
Code gets added to existing code on runtime, and the whole code executes as one.