Then there were doors that wouldn't open unless you asked politely, or tickled them in exactly the right place, and doors that weren't really doors at all, but solid walls just pretending. It was also very hard to remember where anything was, because it all seemed to move around a lot.
(Harry Potter and the Sorcerer's Stone)
It seems that all is a distributive determinative (Angela Downing) for plural noun or mass one. And so I'm confused about what it refers to. Does it refer to anything? If yes, isn't there grammatical problem?