The reputation of the Pythagoreans for secrecy rests entirely on two passages in ancient sources. The first is Iamblichos, Life of Pythagoras (ยง34) 247 (translation here):
With respect to Hippasus however especially, they assert that he was one of the Pythagoreans, but that in consequence of having divulged and described the method of forming a sphere from twelve pentagons, he perished in the sea, as an impious person, but obtained the renown of having made the discovery.
Plutarch, Life of Numa 22 (tr. Perrin):
This is the reason, we are told, why the Pythagoreans also do not entrust their precepts to writing, but implant the memory and practice of them in living disciples worthy to receive them. And when their treatment of the abstruse and mysterious processes of geometry had been divulged to a certain unworthy person, they said the gods threatened to punish such lawlessness and impiety with some signal and wide-spread calamity.
There are two further passages which represent a late attempt to synthesise the above extracts into a single story. They are a passage in Pappos' (ca. 300 CE) commentary on Euclid's Elements book 10, pp. 63-4 edd. Junge and Thomson (1930), and an abbreviated version of Pappos' story in the scholia on Euclid Elements 10, sch. 1. I'm unable to get access to a copy of Pappos' commentary, so here's my translation of the passage in the Euclid scholia:
So not all things' sizes are commensurable. It was the Pythagoreans who first developed the idea of commensurability, insofar as sizes are commensurable. For they designated all sizes that are under the same measure as "commensurate", and those which do not fall under the same measure as "incommensurable"...
For there is a story of the Pythagoreans that the first man who made public the theory of these matters died in a shipwreck, and this perhaps was a sign that all that is irrational (alogon) prefers to be kept hidden in all ways, both unspoken (alogon) and unseen, and if any soul is openly greedy for this kind of theory and makes it visible, then he gets sunk in the sea of reincarnation, and dashed by its chaotic currents. This is the kind of reverence that these men once had about the theory of irrationals.
It should be fairly transparently obvious that the stories told by Iamblichos and Plutarch are tabloid-style nonsense, designed to cater to a superstitious audience, and not representative of anything that actually happened seven centuries before either of them was born. The passages in Pappos and the Euclid scholia are equally obviously just secondary.
The whole thing comes down to the fact that in the earliest period of Pythagoreanism, the only means that they used for transmitting teachings was oral. This is why the orthodox sect of the Pythagoreans was called the akousmatikoi, or "ones who listen". Their reputation for secrecy is simply a consequence of the absence of writings. Things like the discovery of irrationals should really be regarded as one of their greatest achievements, not as a secret dogma or an embarrassment.
For further reading you can't do better than the late Walter Burkert's Lore and Science in Ancient Pythagoreanism (1972), pp. 447-65.