I know next to nothing about btrfs, but on ext family of filesystems, directories are technically just special files. Those files contain a simple list of directory entries (i.e. filename <-> inode number pairs). So I guess in the case of ext, stat reports the size of this list.