The number of sets you do increases what we call the total volume of work being done. The more volume of work you do, the stronger signal your body gets that it needs to grow.
If you do only one set, you aren't giving your body a very strong signal to grow. If the set is heavier than last time (even if you push it to failure), you give a slightly stronger signal to grow, but at one point that just won't be enough. Your body will need a stronger stimulus. So what do we do? We add sets. That produces enough of a stimulus so you will continue to grow.
Basically, every time you exercise you do a certain amount of work. Then you rest for a day or whatever, and meanwhile your body responds to the work and grows.
Now, that amount of work you do has to meet a minimum requirement to be effective. There is a minimum threshold. If you do a little bit of work, but you fall short of that threshold, your body won't get stronger/bigger (much or at all).
The interesting thing is, that minimal threshold constantly changes. As you get stronger the minimal threshold also increases. So you need to do more work to get even stronger. Think about it, you can't keep doing the same amount of work and expect to keep growing (otherwise everyone would be walking around jacked af).
How do you meet that minimal threshold? How do you do more work? The basic methods are you either lift heavier weight, or you do more sets. If you're new, just adding weight will work for a short while, but at one point you'll find that it's no longer enough to get you stronger. That's when you'll need to add sets.
There's a lot more to it, but you're better off doing some research yourself. What we've discussed here is volume. It's part of a few variables that determine how much and how well you grow. Look up volume, intensity and frequency. Do some googling.