Preemptive Praise

If a person or plan fails miserably, congratulations are rather unwarranted. Why is it, though, that God often treats us just the opposite?