In those seasons there were clear signs of progress. You don't give time just out of hope that something drastically changes if they've shown nothing.
Pep in his first season finished 4th, but a simple look at the xG table says they were by a distance the best in the league that season and just underperformed. Klopp finished 8th, they were inconsistent, but they had an excellent record in big games after he took over, hammered City twice, made in to 2 Cup finals in 2/3rds of a season. And mainly - the football both of them implemented showed signs right away, it just took time and signings to cut out mistakes and reach the right level.
That's how it'll be with Ten Hag. But he won't get time if he has a Moyes type season, because he wouldnt have deserved it if that happens (it won't).