I've coined this "architecture archaeology" at work. The further you dig, you find a new technology in use, corresponding with new technical leadership.
technical leadership determines technology... with some (or a lot) of "legacy" tech remaining in place.
At a company, I was brought in to help Version 2 get off the ground (serverless everything, Typescript). Version 1 worked just fine (PHP + VM), they kept none of it. When I left two years later, the new tech leadership started Version 3 (Ruby).