No rules determine which profile is used during installation. An install service can have multiple associated profiles. If a client matches the criteria defined for several of a service's profiles, then the configuration in all of those profiles are applied to the client.
For example, two profiles separately have host name and memory size criteria. If a client matches both criteria, then the install service uses both profiles on the client.