Attention-seeking behavior,
and/or being a showoff.*
How about you?
(*Like the guy in choir who has to stand and sing in highly enunciated German to show us that he knows Beethoven's 9th Symphony, like duh, we've all heard it a million times, while all the rest of us are sitting and singing "doo doo doo" to learn our parts.)