In the context of Thor's story it was pretty pointless. Fan service at best. Sure it's Hawkeye, a character comic book fans might be familiar with, but can you imagine the thought running through the mind of the rest of the audience? If you can't, then think if they spent precious seconds of celluloid time were wasted on introducing throwaway henchmen, agents and other pointless characters. What I hated about the cameo was also the fact it seemed to have been shot after the sequence had been canned. You never see Hawkeye interact in any way with any of the main or insignificant characters. It's like after Jeremy Renner had been cast for the Avengers Marvel thought "hey lets get a quick cameo from him in Thor so we can get some fans talking about it". Well it worked cause here we are talking about it.
but Hawkeye was at 1 point a important character in Marvel's Main Continuity, and will become a important character in the Avengers series, it definitely was NOT pointless to show him.
the manner in which they showed him, yes, was pretty random but he was a agent of S.H.I.E.L.D. & S.H.I.E.L.D. WAS in the movie and played a key role.