Sometimes, it's apart of the game. For instance, in Helldivers 2, friendly fire is a feature of the game so you can't just detonate bombs when surrounded by all those bugs without a care in the world. Otherwise, your own teammates will die from them. Hell, I've been accidentally killed by airstrikes called in by my teammates in-game already. Communication is extremely important in a game like that.