Yes, the purpose was to measure the unmeasurable, which, since it's impossible by definition, created the secondary effects you describe.
For details on the daily workings of stack ranking at Microsoft, the venerated Mini Microsoft is still up and available in all it's 15 year old glory. It's one of the true documents of contemporary tech work, and I'm glad it isn't just buried in archive.org (long live archive.org).
Go back to the first couple years and you'll be soaking in it.
During the stack ranking heyday there was a manager who spent his year compiling a list of mistakes by other teams. When it came to year end reviews anyone asking about the ranking of this manager's people ended up deflected with questions about their own team members. People learned to just leave this manager's rankings alone and work around him. He was wildly successful, getting promoted early and often before leaving the company to go start a recruiting firm which allegedly applies some sort of AI principles to picking good candidates.