think of it another way
the diff is turned by the big gear aroiund the outside
therefore the casing is turning the gears
the squares with the holes are turned by the casing and they surround the gears which are a close fit inside them
sideways force on the squares with the holes, pushing agains the gears that are inside them causes friction between the gear & the square with the hole
the more grip the more friction is created & the more it locks]
have a closer look at the diffs & you should see what i mean