Because they accepted death, and decided it'd be preferable over living out their lives with Toriel.
If they wanted Asgore dead, they 100% could've taken him down. The perseverance SOUL's trait is entirely about persisting despite difficulty, they would've tried as many times as they needed to beat Asgore if they wanted to kill him. The justice SOUL had the strongest equipment and strongest SOUL mode, with the Empty Gun being the single strongest weapon in the game for fighting Asgore (including Real Knife), the cowboy hat boosting that damage further, and the yellow SOUL mode being a buffed red SOUL.