There could be several personal, social, philosophical and even political reasons to keep a mathematical discovery as a secret.
For example it is completely expected that if some mathematician find a proof of $P=NP$, he is not allowed by the government to publish it as same as a usual theorem in a well-known public journal because of high importance and possible uses of this special proof in breaking security codes which gives an undeniable upper hand to the state intelligence services with respect to other countries. Also by some social reasons publishing such a proof publicly is not suitable because many hackers and companies may use it to access confidential information which could make a total chaos in the community and economy.
The example shows that in principle it is possible to have some very significant brilliant mathematical proofs by some genius mathematicians which we are not even aware of. But in some cases these "secrets" unfold by an accident or just because they lost their importance when some time passed and the situation changed.
Question: What are examples of mathematical discoveries which were kept as a secret when they discovered and then became unfolded after a while by any reasons?
An example is Pythagorians discovery of irrationality of $\sqrt{2}$. They kept it as a secret for a while because of their special philosophical point of view about the rationality of all numbers in the world. In fact their cosmology were based on a presumption that everything in the nature is made of numbers and their ratios. Some stories say that finally a student of Pythagoras' academy left the society and revealed this secret to public.
Read more on their philosophical point of view here, and the controversy over irrational numbers here. Also you can find additional information on the history of unfolding the secret of irrationality of $\sqrt{2}$ in many texts in history of philosophy and mathematics including Russell's "A History of Western Philosophy".