When we shift from historic individuals to literary figures, there's a corresponding shift in the emphasis within types of motifs. The reasons women might choose to pass as men in real life were often economic or practical. In literature, there must be a reason that is important to the plot. Given how (relatively) common it was in real life, cross-dressing to join the military is fairly rare in fiction, outside of the specific genre of "female cabin boy" ballads.