I don't think it's that they become more attractive when they slick back their hair and take off their glasses, per se. It's moreso that a girl who was already attractive ends up looking cooler and more laid back as opposed to the plainer nerdier look, prior, which I suppose gives her the feel of being more attractive when she was always this attractive but was just hiding it with plain-fashion. This is actually the case in Hori-Miya where the main guy isn't even a Plain Nerd or anything and is actually an attractive delinquent who dresses plainly to divert attention from himself. Like, even the aforementioned Useless Princess had this case where the main girl was already quoted as being attractive but her becoming more fashionable made her actually stand out as being attractive, by bringing more attention to that aspect. The Second SonoHana game had this, too, where Kaede was quoted as probably being more beautiful than Sara, an actual Fashion Model, but she dresses so plainly bc she's an introvert that hates attention. It's a trope associated, in many ways, with people who are introverts becoming more extroverted, really.