Here I have explained the underlying ideas behind the movie (SPOILERS).

Rating: Null/10 (13 September 2003)

This movie, like many others, has one or two characteristics that are quite questionable, but at the same time understandable. One of which is the possible impression that Hollywood intended to sell themselves to the general audience by taking the idea of a genius who does the unbelievable act of being cool... "Oh my, look at that! He's just as smart as Steve Urkel (another fictional genius) but he is like, so cool." If that was your take on the movie why should it be? This is where you went wrong, you compared Will Hunting to some stereotypical view of the genius. Does Will Hunting set a good example? Definitely not! He is a gigantic loser, but the message behind the movie is simple: "No matter who you are or how intelligent, we always need to look to our fellow human beings (i.e. each other) for wisdom and guidance." The movie is incredibly accurate in demonstrating how it is very possible for a genius of any caliber to lack wisdom. The movie is also heart-warming and easily delivers bundles of "goodness". Look at the way the movie concludes itself... with Robin Williams reading Will's letter saying,
"Dear Shawn,
If the professor calls about that job,
tell him sorry,
I had to go see about a girl,
Will."
Shawn looks up again, "Son of a bitch... he stole my line..."
Scene changes to an empty highway with a beat-up old car driving on and on, inside steers Will, one of the greatest geniuses the world has ever seen, and although he has not quite gotten anywhere great in life, all the helping hands and friendships paid off, and there he is on his way to something better...
The genius is the closest any human being can get to determining actions and decisions almost always without flaw, this movie united the genius with the unfortunate human beings you might see on the sidewalk when you take a stroll downtown.
You can see how during the middle, before the climax of Will losing his ability to keep things inside, that one by one he loses those people who are his world and yet one by one, he shrugs off any care he has for each loss. First, Skylar, then, the Professor, then Chuckie (not really loses) who tells him basically, "I don't really want you to be around..." this comes as a shock to Will, since he always though that if he loses someone new in his life, like Skylar, he can always fall back on his best friend...and then finally Shawn, who gives Will the idea that he had enough of his 'shit' because Will spoke to Shawn with very little respect after everyone else who was important dropped from his life as if like flies. "Look at me Shawn, what the hell is the point? I lost everyone important to me, all of our sessions were a waste anyway, I might as well show you that I'm nobody you should be trying to help, so I'll test you to..."
I think my explanation in the "A Beautiful Mind" forum would help you understand what makes one genius behave a certain way, and another almost the complete opposite. I mean Will Hunting is on the opposite end of the personality pole to John Nash (a non-fictional genius) and Steve Urkel.