They both are both short and contain similar parts and various helper will be shared between both parts of the code so it's easier to use a single file.
These new calls may be used to convert classic UNIX/glibc NSS struct passwd and struct group records into new-style JSON-based user/group objects.