One of my favorite studies on learning and expert skill is a study done with chess experts.
They gathered a group of chess experts and novices and showed them a chess board on a projector. The researchers then turned off the image and handed them a chess board and a box of chess pieces and had them recreate the chess board shown them previously. The more expert the player the better they were able to recreate the board arrangement.
Now here is the interesting bit.
They then showed that same group random arrangements of chess pieces on the board. With this random placement the experts were no better than the novices at recreating the board.
The first images shown were valid chess arrangements from actual games.
What does this mean?
It means that what we commonly call memorization really reflects an understanding of patterns.
In music, some musicians can "memorize" and "learn" music faster than others. I believe what this shows is the musician's skill at understanding the patterns. Music is not random. The chord pattens follow some common patterns.
This is also true of improvisation. A good improvisor understands the patterns and rhythm to make something up. The improvisor isn't making up random stuff no more than speaking language is making up random sounds.