How can the order of execution in the shell as it relates to redirection be upset about 1 time out of a 1000 on my system?

Considering this Q&A about the order of execution in the shell as it relates to redirection, and despite the fact that if a file doesn’t exist it gets created first so that cat example.txt | shuf > example.txt doesn’t complain that the file doesn’t exist – which just confirms the order from what I understand – then why is it that about once every thousand times on my system the shuffle works when I do this (backup contains 15 static values each on their line)

What does <<-EOC means?

I’d like to know what the minus (-) and the EOC in the command below means. I know some languages like Perl allows you to chose any combination of character (not bound to EOF) but is that the case here? And the minus is a complete mystery for me. Thanks in advance!