One of the common fallacies that most frum Jews believe in is that intense learning and deep knowledge of Torah are equivalent to piety. One looks at many great Jewish leaders whose personal behaviour might have been less than exemplary in some fashion but concludes that they must have been pious because they are so learned. This is some notion that has to be disabused.
For one thing, learning in and of itself is not a final value. The purpose of learning is twofold. First there is the need to know how to practically behave within the parameters of halacha. The second is to develop a relationship with God. We are told by the Torah that we must be kadosh because God Himself is kadosh. Chazal tell us that the best way to engage in imitatio dei is to copy those things we call His middos. He clothes the poor so we do. He visits the sick so we do but the best way to come to any understanding of who He is, as if that were possible, is to learn His Torah. Ultimately God is the most positive moral force in existence and therefore it is our duty to emulate Him and become positive moral forces ourselves. The learning is to help us get there. Learning without progression in that direction would therefore seem to have far less value.
As a result, it should be obvious that there is no necessary connection between learning and piety. The former is necessary for the latter to be developed in its fullness but the latter does not necessarily appear even after copious amounts of the former if the learning is not done to that end.
For another thing, consider that the word "pious" is quite malleable. One example I like to recall appears in Solomon Grayzel's A History of the Jews in which he comments that for many centuries a Pope's piety was measured by how much he persecute the Jews of Chrisendom.
Take, for example, the Satmar Rebbe. Here was a man who was undoubtedly a genius and one of the defining halachic authorities of his generation. He was obsessed with reaching a level of perfection in his performance of mitzvos. His attention to even the most minute details in a given situation is legendary.
He also abandoned all his followers in Hungary, running away to safety while leaving them to die with empty words of encouragement about how their learning and tefillos would protect them. He saved his neck by using Zionist help and spent the rest of his life condemning those Zionists while building up a philosophy in which God never helps us but only sends us punishment which means that anything good that happens is a trick of the Satan, not a sign of His mercy. His followers today openly side with enemies that seek to wipe out our State and even when signs of division will result in damage to the Jewish nation they continue to protest to show they're separate from us kofrim.
He was learned but was he really pious? And if you say he was pious, what exactly is your definition? Does he boil down to "Well he learned a lot and he was medakdek about all the mitzvos"? Does the phrase "And he was a genuinely nice and loving guy to everyone" fit in there somewhere?
Learning must be done for a simple reason: to become a better person. Not a more medakdek person, not a more obsessively precise about minutiae person, but to become a better, more decent and loving person. All the learning in the world that does not lead to that end would seem to mean little since it failed to accomplished what it was meant to.