Users and groups are used on GNU/Linux for access control — that is, to control access to the system's files, directories, and peripherals. Linux offers relatively simple/coarse access control mechanisms by default. For more advanced options, see ACL and LDAP authentication.
As you can read in bionic/libc/docs/OVERVIEW.TXT user and groups are hard coded. Next to the hard coded id’s every
application that gets installed will get it’s own id starting from 10000. It recognizes “app_1234” as the synthetic
name of the application that was installed with uid 10000 + 1234, which is 11234
system/core/include/private/android_filesystem_config.h contains the list of user user id’s mapped to numbers and this code gets included
when building bionic. A bit lower in the file you will find the DEFINE → group name mapping. This is a one to one mapping so AID_VPN(id 1016) is the group called “vpn”.