The FTS triggers for unmanned crafts either manually from mission control or automatically based on some set of onboard checks and safeguards.
Given it detonated so quickly after launch, some piece of equipment stopped responding or a sensor started reading a dangerous value which then triggered the FTS.
This really isn't an unusual thing since this is the first launch of this rocket design (and if I remember correctly the first launch by this org).
But yeah TLDR it's better that a rocket explodes in a predictable manner that gets rid of all the fuel and breaks everything up into reasonably small parts while they are still in control of the rocket than for things to go wrong and it crash or otherwise cause more damage.