One can approach this question and attempt to understand the core issue from several angles. While there are certainly specific personality variables that play a role, I prefer to tackle it from a developmental approach and explain this phenomenon through that lens.
Adolescence and early adulthood are developmental periods suffused with idealism. Witness the social movements and upheavals that begin on campus. In our circles, Yeshivas and seminaries capitalize on this youthful idealism and channel it in the direction of their specific cultural value (e.g., Limud Hatorah, Chassidus, Aliya to Israel). This period is one where perfection & shleimus are emphasized and channeled.
Transitioning from this phase into middle adulthood usually involves a "landing" process which most can successfully navigate. Most can retain their core values, while tempering and nuancing them somewhat. As she experiences "real" life, the arch-liberal college alumna begins to understand a conservative outlook. The bochur who was destined to learn in Kollel for life recognizes the reality and begins taking some courses while maintaining his Torah hashkofa and Sedorim. This is normal development. For an example of this, seforim note the difference in approach between Rav Shimon Bar Yochai and his son, Rav Elazar (Shabbos 33b).
Those entering this phase with mental health and personality struggles will inevitably have a harder time with this transition. This may be true with your son. He may struggle with perfectionism, rigid thinking, and unrealistic expectations, which may interfere with this transition. Ideally, yeshivos and seminaries should flag these individuals and ensure that throughout they receive a "grounded" message.
The task for you right now is twofold. First, appreciate where he is developmentally and understand that much of this will gradually cool with the passage of time. A second task for you to consider is to introduce him to a professional or mentor whom he can hopefully respect and can help shift his perspective. Within the right relationship, these individuals often seek religious grounding and nuance. They seek to idealize someone who has successfully navigated this murky process and look toward a healthy role model as a template to work off.