What is the meaning of [Like a Moth to a Flame]

Drawn to something or someone despite the dangers