Because that's how embargoes work? They impact not only goods, but also services. The US has one on Iran. And as Slack is a US company (or rather, a company which has an interest of maintaining operations in the US, regardless of where it is based), it complies, thereby blocking service to any entities (e.g. people) in Iran.