Their fellow soldiers/marines/sailors ask, maybe not directly, but it's not like everyone just talks about what their job is going to be like that day. Most servicemembers talk to each other about friends, families, and relationships. It is natural, especially when people are spending months at a time together.
Common conversations would include if someone is dating anyone special or talking about how good a girl/guy looks. If a guy is gay and another servicemember asks him if he is dating anyone, he could honestly answer yes without violating DADT. However, if he is asked a more specific question about a girl he might be dating or for more details, then the gay guy would have to lie or decline to answer to avoid violating DADT, where as if the same guy was straight he could easily answer with no fear of being "discovered" and possibly kicked out, just for talking about a person they are dating. And straight guys and girls can have and show pics of themselves kissing boyfriends/girlfriends/husbands/wives, whereas, gay guys and girls can't without chancing having the wrong person see them and the possibility of being kicked out. Straight soldiers can share wedding photos with anyone, including posting them online, without any fear whatsoever of being kicked out for such things. Gay soldiers can't. Straight soldiers can invite their significant others to service balls and dance and be an open couple. The significant other could honestly answer questions about their relationship, if he/she wanted to. Gay soldiers would have to hide their relationship they might have with a "friend" they took to a service ball (if they could bring the person at all). And their significant other, if able to come, would not be able to honestly answer any questions about the relationship. And by relationship questions, I am referring to even innocent questions like how long the couple has been together, where they think the relationship may go, if they want to have/raise children, if they've met each other's family, etc. These are some types of questions that my husband's Marine buddies and chain of command asked me while at a Marine Corps ball when we first started dating.