Athena is the goddess of wisdom and strategic aspects of war. She is also pretty much every Greek hero's best buddy. She helps out Perseus, Jason, Odysseus, and bunch of others as well. So, it's no wonder that she shows up to help out little baby Heracles when he's stranded in a field. When the goddess comes across Heracles crawling around in the wilderness, she can already sense his incredible potential and saves him from death in wild. Throughout Heracles' life, Athena helps and guides him.
Why does Athena help Heracles so much? Does she have a special hatred for Hera? Does she love Heracles because they share the same dad? Does she simply love great warriors? Your guess is as good as ours.