Well, that was Mementos. It's basically a manifestation of Humanity's desires. That thing we fought is a Shadow, or someone's repressed thoughts or feelings. By kick a Shadow's ass, /but not killing it/, we can cause the person in reality to have a change of heart.
Chumps like him just wander Mementos, but for really twisted people, like Sins, we have to go to a dedicated Palace.
The entire combination of Palaces and Mementos is called the Metaverse, and, like the Dark Hour and TV World, shouldn't exist in its current form. It's all a product of the Nexus... for some reason we don't now yet...