Final answer:
STP in scalable networks eliminates Layer 2 loops by disabling redundant paths, ensuring a loop-free topology and preventing potential broadcast storms and network instability.
Step-by-step explanation:
The function of the Spanning Tree Protocol (STP) in a scalable network is to eliminate Layer 2 loops by disabling redundant paths. When multiple active paths exist between switches, Layer 2 loops can occur, which may lead to broadcast storms and instability in the network. STP ensures that only one path is active at a time, while keeping redundant paths in a standby state to be activated if the primary path fails, thereby maintaining a loop-free network topology.