This is an example of a friend function accessing private data inside the LightingManager class.
What it is returning is a copy of a static member of LightingManager that is also a LightingManager object. A static member of a class is globally visible to all objects created by the LightingManager class, treated as a single object shared throughout all the others.
While that might seem like it's creating an infinite self-referencing loop cataclysm, it is actually completely viable(*).
You might like to check out "linked lists" to see a useful example of self-referencing classes in action.
(*) The code itself doesn't do much beside being a demonstration of this weird fact. It might be easier to understand if you know about pointers and how the compiler might undertake translating the static keyword's instructions behind the scenes into assembly/machine code. This gets a bit beyond my field as I've never written a compiler.