With the caveat that I haven't seen those specific shows, the very obvious response to that question is 'why not?'. Maybe it doesn't add anything to the storyline, but does it take anything away?
I guess when you're constructing a character, part of that is establishing their sexuality. Gay people exist, so gay characters will exist. It might not be essential to the story but so what? I think you seem to be coming from the position that heterosexuality is somehow the default, the 'normal', when of course homosexuality is also perfectly normal and it's just a fact of life that some people are gay.
One good reason for having gay (or other minority) characters, as I think I've mentioned before in this thread is that it gives gay viewers a chance to see themselves in the story. I addressed the issue of disproportionate representation earlier but got no acknowledgement so I'm not sure I've got the energy to go into it too much, but just consider how much TV you have to watch in order to see someone like you on screen, doing something you aspire to do, even if that aspiration is simply getting on with your life and being yourself. Now do the same but imagine yourself as black, or gay, or disabled etc. These people exist and they deserve to see themselves depicted in our art and culture, not only as special cases but as part of society. And maybe by seeing them on television, the rest of us will feel better about making them welcome within that real life society.