The security.bsd.allow_read_dir sysctl was added FreeSD-current on
June 4, 2020. It was merged into the stable/12 branch on Jul 8 so it
is not in -12.1 or earlier FreeBSD releases. On UFS filesystem you could
always read a directory until this sysctl came along. As the FreeBSD
commit log says,
Users that know what they're doing can conscientiously set
bsd.security.allow_read_dir=1 to allow read(2) of directories, as it has
proven useful for debugging or recovery.
[Speaking just for myself] I'd be okay with just documenting the behavior.