It’s hard to remember this kanji by its origin. So you can remember this kanji by kanji 丁, which is the counter for tofu. You can remember 庁 by “there are some tofu in the government office”. So 庁 means “Government office”.
As you know the origin of this kanji，now you can remember it easier.