Because Riley didn't interact with any other females, only males who don't understand the intricacies of a woman's expressions. Also because of female intuition, probs. But she's just assuming that he's homo for Escellar, not that she's a female in a dude's body.