Moaning Myrtle had already helped Harry with the Golden Egg in exchange for him to come and greet/meet her sometimes. Yet, Harry did nothing to keep this promise and straight-up lied to her.
Despite that she found him in the middle of the Second Task and gave unsolicited help:
"How are you getting on?"
Harry thought he was having a heart attack. He whipped around and saw Moaning Myrtle floating hazily in front of him, gazing at him through her thick, pearly glasses.
"Myrtle!" Harry tried to shout - but once again, nothing came out of his mouth but a very large bubble. Moaning Myrtle actually giggled.
"You want to try over there!" she said, pointing. "I won't come with you... I don't like them much, they always chase me when I get too close."
Harry gave her the thumbs-up to show his thanks and set off once more...
— Goblet of Fire, chapter 26 (The Second Task)
Why did Myrtle offer her help to Harry so easily during the Second Task, even though he had broken his promise to her?