There's something called the “many eyes” hypothesis for open-source software. The fact that people can see the code makes it more likely that security and other flaws will be discovered. I'm not sure there's a really strong empirical backing for that, because lots of security flaws have existed in open code, but there is the big advantage that people have more control over their own destiny because you can do your own investigation. You can make your fixes. You're not dependent on a vendor to discover and fix security problems. On the whole, there are some real advantages to open-source software, but it's not completely black and white.
On April 10th, 2019. See this statement in context.