Most if not all of the Mahayana doctrines are present in the Pali Canon in their basic form, often as mere ideas implied by brief Buddha's utterings. Since Pali Canon cannot possibly be 100% exhaustive account of everything Buddha taught it is safe to assume there were other teachings or details of teachings not captured by the suttas.
We know for a fact that after Buddha's death there were centuries of speculative analysis and systematization of his teaching. The Samyutta Nikaya was compiled and organized by topic, then the Anguttara Nikaya, then the core concepts in these two were extracted and boiled down to the matrika lists, which were then elaborated upon to create what's known as the Abhidharma.
This happened to be the same historical period when India went from zero literacy to one of the strongest textual traditions in the world, the trade routes between West and East were established and facilitated the exchange of ideas between Greek, Persian, Indian, and Chinese cultures - all great in their own ways, and a big chunk of the Indian territory along the Ganges fell under Greek rule.
This was a period of tremendous development for India in all areas - ancient technology, natural sciences, medicine, mathematics, linguistics, philosophies of all kinds, even traditional Hindu religion developed new theories and teachings.
In addition to that, what at the time of Buddha were temporary camps of otherwise homeless wandering monks, developed into permanent monasteries with dedicated research staff specializing in Buddhist studies.
Imagine this environment spending several centuries reading every sutta thousand times over and analyzing them from all possible angles debating their obvious and hidden meanings. This was the vogue of the times. The best minds of India were drawn to this then highly respectable and intensely satisfying activity.
Naturally, some of the ideas present in suttas in the seed form were stumbled upon by the ancient scholars again and again, in different places at different times. Connecting the dots the later scholars gradually came to a realization there was a definite layer of meanings in the suttas beyond the superficial.
This layer of meanings came to be known under the moniker of prajna-paramita, the transcendental wisdom, or perhaps the transcendence of wisdom. It took northern India about 4-5 hundred years working by trial and error to churn the milk of the suttas into the butter of prajnaparamita, and to recognize that this, indeed and beyond slightest doubt for those who carefully studied the suttas, must be the heart of what Buddha-Dharma was all about.
The Nagas and Dakini realm in Tibetan Buddhism is a well-known and rather opaque metaphor for the abstract realm of latent potentials. In this context it means that the teaching of prajnaparamita was there in the seed form but took time and human assistance to get developed into a detailed doctrine.