Hermione really had had a crush on Lockhart in her schooldays, and had only denied it in hopes of avoiding Ron and Harry's constant teasing. But she had only been thirteen at the time, and had later put it down to adolescent hormones.
So she was rather startled, when she met him one day in Diagon Alley, five years after leaving Hogwarts, to discover that she was still as attracted to him as ever. When she struck up a conversation, she found that the memory wipe had done him a world of good. Gone were the egotism and the pronounced selfish streak. Now, he was a mild-mannered bookseller, bemused by what fame he had left, since he never had got his memory back.
Exactly Hermione's type, in fact.
Long live revived teenage crushes!