Yuki is actually female-to-male, not male-to-female.Yuki's just so feminine that everyone thinks it's the other way around. Masculinity and femininity have very little to do with gender identity, after all.
Yuki is a recursive crossdresser.Yuki is a girl with a warped sense of gender identity who likes the idea of having certain people believe that she is really a crossdressing boy as she thinks traps are just so awesome and as a bonus, it also protects her virtue by keeping certain people confused about her.
Yuki is a shapeshifter.She is constantly switching between male and female because she likes to mess with Masato's head.
Oozora figured out she's the Maa-kun Yuki initially fell in love with.When Yuki explained the Maa-kun "she" liked rescued "her" like Oozora had just rescued Masato, Oozora (eventually) connected the dots. She must remember people calling her "Maa-kun" back when she acted and looked boyish.