I have done a bit of competitive programming, occasionally, but I have never been in a competition where there is a penalty for wrong submission.
You obviously have to fix your bugs to validate the answer, and you obviously lose time when you didn't make it right the first time and have to debug your code, but when it comes to ranking, the only thing that mattered is the time it takes to get a right answer.
But I agree that competitive programming can be a great exercise. Not just for the algorithm, but also for everything around the algorithm. For instance, you don't have time to waste parsing a list of integers. You have to get these parts right the first time almost without thinking, so that you can focus on the hard parts, like the algorithm. For example, if you are not confident that you parsed the input data correctly, you will lose time trying to figure out if you algorithm was wrong or if you fed it the wrong data.