How SLAM retrieves the computer's Local Admin password

Simple: SLAM doesn't retrieve the computer's Local Admin password - LAPS does! SLAM is a Premier Operations Program offering (POP) for Securing Lateral Account Movement. It workshops credential theft mitigation (CTM) and counters lateral traversal with logon restrictions and firewall rules (among other protections)... but one key feature is deployment of LAPS, the Local Admin Password Solution.

So SLAM includes LAPS, and searching for how SLAM does something with passwords might not yield a result. (Hopefully "Until now..."). LAPS is quite well-documented, though, so answers are likely available.

POP-SLAM has been recently complemented by OA-SLAM (OA = Onboarding Accelerator), which is a more "let's do it all in production"-style Microsoft Services offering.