As a NetBSD user, I would guess it is for use with pkgsrc. That would be great for mac people if my wild guess is correct.
bin | include | pkgdb.refcount
dict | info | pkgsrc
etc | lib | qt5
gcc12 | libdata | qt6
gcc14 | libexec | sbin
gcc16 | man | share
gnu | pkgdb | tests
On NetBSD /var used for logs other data. But I suppose someone could configure under 'pkg' if they wanted to,