This saying is
at least 15 centuries old. The great general Belisarius who served under the
Byzantine emperor Justinnian is known to have said this. Belisarius would say
that you cannot expect God to help you if you put your army in a situation
where you can be defeated.
What this saying tries to express is a belief that you cannot expect God to help you if you do nothing to help
yourself. You have to help yourself first and then God will naturally help
you.