Or the person was not taking PrEP as prescribed, either missing doses or taking it inconsistently. Once they're infected, if they keep taking just Truvada, then that strain will begin developing resistance, which they can pass on, potentially to others taking PrEP correctly. There have been I believe 6 cases of people being infected with resistant strains while in PrEP.
That's why it's important for people taking PrEP to be screened regularly, and put on a proper cocktail if they test positive.
If someone is using PrEP and is exposed to HIV, then either the drug works and they avoid infection (in which case there is obviously no impact on drug resistance) or they become HIV+. But in that case, they were either exposed to an already-resistant variant, or they were astonishingly unlucky and the drug failed to prevent infection - in which case, resistance is a moot point.
A person needs to develop an active HIV infection in order to communicate the disease to another. PrEP prevents this from happening in the first place.