Why could some one not function in the real world, barring some kind of health issue?
People are nice to you when "you're paying them". This is the case when you're a student, even if you're on scholarship, fellowship, etc. Life gets tougher when people are paying you, and unfortunately, some of the perpetual student syndrome exists because people are trying to avoid the hard knocks that life is prepared to (guaranteed to) dish out. I'm not sure what to do about that syndrome.
Then you need to find a therapist, and start developing skills to survive in the real world.
I've known a few people--all male-- who got well into their 30s-40s without having a "real" job.