The Community string comes to picture in case of SNMP Polling. i.e. a Software (SNMP polling device) connect to the target host SNMP Agent, authenticate using the community string provided, and collect the required information from the device.
But in case of SNMP traps, they are generate when a abnormal behavior is detected and send to the configured destination. Authentication does not comes to picture in this case.