Why is this output there?
It is sent to the Bitcoin node by its peers in their
version P2P messages.
Is it used anywhere? Does it have a use case?
Yes. Foremost, it is used in Bitcoin's P2P networking. When a node wishes to accept incoming Bitcoin network connections over the Internet but doesn't know its own IP address on the Internet, it can use the
addrLocal reported by an outbound peer to discover what IP address the outbound peer sees this node's connection coming from. If this IP address is within valid Internet ranges, this node may then advertise this IP for future incoming connections. In Bitcoin Core, this discovery behavior is enabled or disabled by supplying the
-discover option to bitcoind or bitcoin-qt.
addrLocal can also be used by applications that receive the information via the getPeerInfo RPC procedure you mention. If an application is wanting to make its own decisions about what IP address to advertise for a node, such as for a website, it can include this peer-supplied data in its decision. An application might also wish to determine how a peer connected to a node when this node offers multiple routes for peers to connect (e.g. via NAT, reverse proxies, forward proxies, tunnels, anonymizers, etc.)
Furthermore, they commented that "Most SPV nodes set this to 127.0.0.1:8333", why would an SPV node do that?
Either because the SPV node is actually running and connected locally or because the SPV node has lied. A use-case for any type of node lying might be the developer leaving in a placeholder value while they haven't finished implementing the network protocol's requirements fully, or if the connecting node wishes to obscure what route it took to connect to this node when there are multiple options available.
The "most SPV nodes" wording has largely been removed from documentation.