She was in PA the night before the election and gave a speech along with Obama. Even at the time the pundits were all astounded that she was in PA. They thought that PA was locked up, and couldn’t figure out why she was there. Clearly Hillary’s team did know something was turning, it was just too little too late to stop it.
It’s easy to second guess, and clearly their team didn’t have the right polls, but I can’t blame Hillary for not being a better statistician than, say, Nate Silver or Sam Wang (who gave her a 99% chance of winning).