I mean some people ask because they want to make sure they don't offend you with certain things they may say. I personally don't mind if people ask, especially if it's in a way of wanting to be considerate and respectful in conversation.
For example if I'm around my hetero guy friends, they know I'm gay so when they begin talking about girls and pussy, they know not to ask me any questions pertaining to that. Instead they include me in the convo with things more pertaining to gay sex like "dude is it the same with guys?" or "i hate when chicks XXX. do guys do that shit to during sex?"
Now sometimes people are asking just to be nosey but I find most times in my life, when asked it's so they know how to carry conversation with me and refrain from saying something that may be offensive. I had a friend that used to use the word "FAG" religiously. LIke it was just a normal part of her convo before she and I began to get close. When we finally talked seriously, she asked me do I have a girlfriend or boyfriend. I told her no I don't have a boyfriend, obviously making it known i'm gay. Since then, she doesn't use the word around me and actually apologized for using it so vulgarly.
Don't take it so personal.