The Origins of Greek Mythology are unknown, they are mearly stories told generation to generation. Here are some summarized phyosophies of how it started:
Euhemerous (300-200BC), Greek Scholar
"all myths are based on historical facts"
Muller (1800s) German Scholar
Believed that gods represent the forces in nature
Tyler (1800s) English ANthropologist
Believed that they were accounting for the unexplainable things in life. And the greeks interpreted their dreams into myths. Tyler believed that while you sleep, your sould wanders, and does unexlplainable things, and these things accounted for the myths.