This is an idiom. Here "holding on" to something means to continue doing it. Alternate translation: "he continued to commit the sins" (See: [[rc://en/ta/man/translate/figs-idiom]])
"Turning away" from something is an idiom which means to stop doing it. Alternate translation: "he did not stop committing those sins" or "he continued committing those sins" (See: [[rc://en/ta/man/translate/figs-idiom]])