Zig When One Should Be Zagging

What does the idiom “Zig When One Should Be Zagging” mean?

Definition:

To make an error; to choose an incorrect course

For example:

“My problem during my 20s was that too often I would zig when I should be zagging.”

Notes:

This is very informal.