You aren't wrong. Tanzania != Malaysia, as another commenter seemed to think. Their version of Sharia is nowhere near as strict.
Incidents of violence are the product of opportunity and generally perpetrated through in-group policing. Westerners and other African travellers are less exposed, so in the case of an LGBT developer from the US travelling to Zanzibar (which is also a very special case relative to the rest of Tanzania) I doubt they'd be in any real danger unless they were publicly displaying unambiguous attraction to the same-sex. I know an openly gay couple living in Kinshasa, which is a much more dangerous environment.
This is a very cheap shot from PSF and a classic case of perfect defeating good.