In reality, it’s a safety thing. For wolves (and dogs, really,) taking a shit puts them in a compromised position. So, as pack animals, they watch each others back as one takes care of business.
Fwiw, if we didn’t have purpose built rooms with locking doors and climate control, plumbing and all that, we’d be in a compromised position, too.
The bathroom door at my parents house still bears the marks from decades of good boys letting my dad know that he really shouldn't be doing that sort of business all by himself.
He did :) He actually caved quite early, but out of courtesy he kept the door closed when the house was busy with people. Our dogs did not see why that mattered :)