It was a micro tournament and still fairly early on. He probably played his q5 thinking that you had over cards, which you did. I'm guess that he was hoping you'd fold, he ended up getting lucky by outflopping you, and by his hand holding. You're play was pretty good, you just ran into a wacky player.