I've never been in that exact situation before but I am a guy so I understand the teasing part.
1.) Guys kinda just tease each other, it's what we do and sorta in a way how we bond, if you guys are close that could be the reason.
2.) He is trying to discourage you from doing what your doing because he's worried about your well-being or because your making him jealous.
Other than those things though I really can't think of any other reasons, maybe you should talk to him about it.