The badges here in the community are just to show how active you are. If you have one where it shows you have received 100 likes for example, it gives an idea to other instructors that maybe you give good advice. There are various ones for responses given, posts creates, likes accrued, etc. It is just a way to give others an idea of how knowledgeable you may be.
That said, many do collect badges because they comment on everything and make lots of random posts-badges are just one factor to look at to see if someone is delivering good advice or not.
Do you mean badges in the community here, or badges on your course on Udemy? If the former, just the joy of feeling smug about it. If the latter, it gives students confidence in the quality of your course, which should lead to more sales.