Permissions are derived from /etc/bashrc.
If you will run the following command:
At the beginning itself you will find the following lines:
# /usr/share/doc/setup-*/uidgid file
if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
Which in simple terms translates to: Any file created by a normal user will have umask value of 002 which inturn result in the permission 664. And any file created by a root user or system user will have umask value of 022 which in turn result in the permission 644.
So to answer your query I would say that creation permission derives from /etc/bashrc.