That depends on whether he was looking at the girl first. If he was, then it's a part of flirting and kind of seeing if there's mutual interest. The reason for the shyness is plain 'ole sensibility. You're thinking about it from the viewpoint of liking the guy - the avoiding actions aren't needed there and usually go away quickly. But until a guy knows there's interest, he can't just tell any gal how he feels - humans (guys and girls) are not Nature's nicest beings and opening yourself up to someone who doesn't like you is a good way to ruin your day.
If he wasn't looking and a girl looks at him and he looks away more, then I think he is not interested.
Afraid of rejection, simply put. Do I want to tell her I like her? Yes, very much. Working up the nerve? Now that's a whole different issue. Besides, the eyes are what attract me in the first place. If I'm looking into her eyes, it's as good as telling her how I feel (not in conversation, as I'm comfortable then. In a crowded room, and then eye contact - ouch - dead giveaway).
Well, he could be shy. If I do not know you and I am looking at you across a room the first words out of my mouth will not be to tell you how I feel. That's like shooting myself in the foot. Now if you can get him to keep the gaze then you will know. If he does not make a move after that I would assume he is shy. Then, you can take some initiative and go find out for yourself. If he shrugs you off, then do not worry about it.