But you’re only one person, and we come in contact with so many people on a normal, "non-quarantined" day. To create true protection, the number of people with immunity to a disease needs to grow. That way there are fewer people to spread the disease.
If everyone around you is immune to something, there is no one left to give it to you. They have essentially created immunity for you. The herd is protected! And, if the virus does not spread, eventually it will fizzle out.