I was a bit surprised that there is no book like "Teach yourself music with GarageBand" or the like...
That's probably because GB avoids any musical terminology. You never see the words "chord" or "chord progression", you can never see all the notes that you produce on one sheet, only the notes of one track. In other words: For the layman, GB is not a program to learn about why this note sits there and another note sits there. It tells you to trust your ears and put together fun stuff with the loops. (Yeah, I know that the ads suggest that anybody can do anything ... but real music, at least in most genres, isn't generated from pre-fab pieces.)
In this forum, we have been talking e.g. how to put together chord progressions in GB (harmonies that change while the piece progresses), and the program is hardly of any help in that regard. While there are some basic capabilities (like shifting regions up and down a note), the bottom line is: If you want to do more complex music, you have to play it or "write" it - either with the software instruments or by recording a live instrument. But how and what to play - this knowledge you have to get elsewhere.
This is not to discourage you - on the contrary, go on and explore this fascinating world. But if you want to know why this note sounds right and the other note sounds wrong in a certain bar, you have to dig deeper, and GB isn't very helpful.