Don’t use it for scientific accuracy and you’ll probably be fine.

Come on. Rainbows don't have a purpose. And they don't always happen after a storm. They might even happen before a storm. You could even make one with a garden hose. And you can definitely have a storm that doesn't end with a rainbow, which raises the question of how this mother would know the storm was over.