It is basically a glorified fuzzy lookup table, but then again, so can one view deep learning (fuzzy hierarchical localized lookup).
Pure memorization can even outperform logistic regression, especially with big data sets, so there is some recent debate as to what degree models memorize and to what degree they generalize.
So in essence, the rules which relates input to output are learned from the data in deep learning.
In nearest neighbour, the rule wasn't learned, we figured out the rule ourself: "use the nearest data point's result".
But in deep learning, the rule might be something like when feature x and y are between z range of each other and etc. And this rule is not defined by us, but by the weights which are learned from the data.
Effectively, deep learning thus learns the rules that define the relationship between input and class. But nearest neighbor is just a static rule that happens to be pretty general in essence, so it gives okay result for a lot of problems.
Not an AI expert, so take all this as my simple current understanding.
Is it learning patterns in the data, or is it just a glorified lookup table?