Mary Magdalene's only "sin" was having seven demons. No where does it say she was a prostitute and I doubt she was Lazarus' sister, Mary.
Since we don't know what behaviors the "seven demons" caused in Mary, being promiscuous does not seem unlikely. To be cured of mental affliction that caused such behaviors and shunning by civil society...must have been a wondrous blessing indeed. No wonder MM devoted the rest of her life to following Jesus. However, it does seem a stretch to assume she was the same Mary who was the sister of Martha and Lazarus. If the sister Martha sought out Jesus to raise Lazarus, why would she not have sought him to heal her sister Mary?
Unfortunately there were many "Mary's" in the circle of families and followers of the disciples.