You get ideas from daydreaming. You get ideas from being bored. You get ideas all the time. The only difference between writers and other people is we notice when we're doing it.
The history of man is the history of crimes and history can repeat. So information is a defence. Through this we can build we must build a defence against repetition.