also he was probbaley assesing his level of arogance, for yoda says even a lot of jedi are arrogant in episode 2 and by acting the fool yoda can see how aroggant luke actually is by setting little tests for him eg "you must stay here snd complete your training" and he doesn't he goes off and gets his hand chopped off.