It looks like "nam" means "item" or "entry" in the context of getpwnam or getspnam. What exactly does it stand for?
getpwnam
getspnam
It means "by name".
E.g. getpwnam -> get passwd entry by name. Contrast to getpwuid -> get passwd entry by uid.