Our Gemara on Amud Beis relates a story of a person who was impetuously determined to study Torah.  In fact, he made a vow that if he married before he “learns the halachos”, he would be forbidden to benefit from anything in the world.  It is a matter of debate what he meant by “learning halachos”.  Some of the commentaries are vague, though it does seem that it means mastery of the known body of practical teachings, be it memorizing the Mishnah or some other known set of material (compare Ran to Tosafos.)  The gemara reports that he was unable to succeed despite making heroic efforts, and so a discussion ensued about how to annul his vow.  

Regardless of how he came to annul the vow, we must ask, if he put in so much effort, how come he came up empty-handed?  Did we not learn in Megillah (6b):

אִם יֹאמַר לְךָ אָדָם: יָגַעְתִּי וְלֹא מָצָאתִי — אַל תַּאֲמֵן

If a person says to you: I have labored and not found success, do not believe him.  

The simple answer is what the Gemara in Megillah qualified its statement: 

וּלְדִבְרֵי תוֹרָה לָא אֲמַרַן אֶלָּא לְחַדּוֹדֵי, אֲבָל לְאוֹקֹמֵי גִּירְסָא — סִיַּיעְתָּא מִן שְׁמַיָּא הִיא.

And even with regard to matters of Torah, we said this only with regard to sharpening one’s understanding of Torah, as the more one labors, the deeper the understanding of the material he achieves. However, to preserve what one has learned, it is dependent upon assistance from Heaven. Not everyone achieves this, even with much effort.

Since this person had a specific target of remembering a corpus of knowledge instead of merely achieving depth and understanding, this is a gift from God that not everyone qualifies for.

Mei Hashiloach (Vayetze 8) has a more subtle answer.  He compares Leah’s seemingly effortless success in having children to Rochel’s epic struggle.  He says for many years she did not succeed even though indeed she was putting in tremendous effort in self-development and prayer, because she was, in his words, “knocking on the wrong door.”  Mei Hashiloach is clear in stating that even when a person puts in great effort and prayer, if he or she is missing a certain middah, there will be no success until it is rectified.   In Rochel’s case, she had to work on her jealousy of her sister and develop the ability to desire children only for the sake of the mitzvah and not in competition with Leah.  Despite all her prayer and teshuva, her efforts were not going to succeed until she found a way to develop this capacity.  Michael Jordan, the famous basketball player, once said, “You can practice shooting eight hours a day, but if your technique is wrong, then all you become is very good at shooting the wrong way.”

Based on this we can understand that perhaps this person needed to develop certain middos before becoming adept at studying Torah.  In his case, perhaps marriage was necessary to help him develop certain qualities that would make him an appropriate vessel for Torah. Until he was ready, no amount of effort would have worked.