I've been shooting since the end of 2018 in IPSC Open Division, and have 3 open guns, of which 2 are identical (1 I only use for matches, the other one is my primary training gun & also the back up for my primary match gun, and another open gun for training only, which I use to rotate with the other training gun), shot hundreds of matches, and did have to switch to my identical back up gun 4 times due to serious issues (hammer drop, broken frame link, cracked slide, loose ejector).
I agree with alot that other competitors have stated above:
1) It really all depends on your personal/financial situation, your passion/dedication and your specific shooting/competiion objectives
2) As Charli stated, especially in Open - Major - Division, but also in Standard - Major - Division, for example, the guns will fail for sure. Having a back up garantees you can quickly restart and you still have a gun to train or use in future matches, because you'll indeed need time to figure out what's wrong and have the broken gun repaired by yourself or a gunsmith, hoping all required parts are easily available.
3) Fellow competitors I know, whom do not want to invest in an identical back up gun, try to solve most common issues with a bunch of spare parts (springs, sping leaf, sights, fiber optics, trigger, recoil spring, etc.) they always bring with them, which did help them out already. But if your slide cracks, the gun is out of order ... Also, witnessed myself:
trying to repair your gun during a - major - match is a pain in the b*tt and seriously increases stress and messes up your mental game.