On the other hand, Medusa may have been punished by Athena for another reason. It may not have been the result of Medusa's vanity, but because of Athena's jealousy of Medusa's beauty. 
One of the common threads in most iterations of the Medusa myth is that Athena was jealous of Medusa. Finding Medusa in a relationship with Poseidon arguably gave Athena an excuse to punish her, enabling the goddess to act based on her predispositions. If Athena did not feel jealous of Medusa, it is possible that Athena would not have been so enraged at Medusa. Not having that impulse would likely have resulted in a different punishment, or even resulted in Athena directing her fury at Poseidon instead.