I don't know why terrorists don't use guns for mass killings, but I suspect it has something to do with the psychological impact. You don't want the attack to be psychologically attributed to individual people who are captured or killed after the attack. It decreases the terror factor. You want the attack to be attributed to a group or a cause, which is much scarier because the force behind the attack is still out there operating. In a suicide attack, the perpetrators are seen as whatever force inspired and controlled the attackers, so there is a continued threat.