Technically, Stockfish does make use of past matches, just not when it's playing. The way it uses its past matches is during trainingpast matches is during training, when a new neural network (NNUE in Stockfish's case) is being trained. Once the NNUE is trained, though, it is "standalone" and does not change anymore.
The Stockfish you can download and play has an already-trained NNUE, so it does not use past matches.