Besides, making the code public will also help hackers, it will be simply a toss of a coin, who will find the flaw first, a good guy or a bad guy.
That's absolutely NOT how open source code works. It's actually the safest code because it is picked apart by the community to ensure that it is safe before it is released. When has Bitcoin been hacked? Closed code is notorious for having security issues & vulnerabilities, plus you have no idea what's in that code of course.
The bitcoin code has proven to have flaws a lot of times and a lot of times new versions fixed have been rushed.
And this is exactly how open source code works, you let people know your code, you let everyone know how the code is written and how it works. Just because 20 guys said: ok this version is ok it doesn't mean it is.
And the supreme argument why it is not better like that is that nobody is doing!!!
I reckon that the only reason none of the exchanges are doing it is because none of them want their code to be copied and have a competing exchange with the same code. However, if the code is opensource, it would be developed and improved upon faster, patches for bugs and flaws will be coded faster and it might be the most secure code that an exchange can have.
Also, the closed source model has already been proven that it is not immune to attacks which they are protecting their software from.