"Reluctant teacher / persistent student" is a standard trope where Asian martial arts are concerned, and this follows the flavor of that. Another example is The Ronin by William Dale Jennings, or more apocryphally The Karate Kid.
This is an integral part of the "hero's journey". This is where the hero overcomes enough arrogance to shift into a state of surrender, quiescence and inquiry -- to a state where learning becomes possible. This is vital, especially when the art is very difficult and takes a total life-energy commitment to master.
This also cements into the student (and the audience) the extraordinary worth of the training he/she is about to receive.
It also shatters expectations of the Western student-teacher dynamic, i.e. Good Will Hunting / Dead Poet's Society / Welcome Back, Kotter etc. where the brilliant teacher does most of the "heavy lifting" to inspire and draw out the potential in a reluctant student, pulling a Pygmalian,* salvaging an otherwise lost student. Here, the teacher couldn't care less about the student, and it's all on the student to show his worth and inspire and draw out the potential of the teacher.
So this would be nothing new to the Ancient One, even without the Time Stone to foresee it. But with the Time Stone; this was a no-risk method, since she foresaw that he would spend days on that doorway if he had to. So she used the "refuse, then accept" method to shift his attitude into a state fit for learning.
And by the way, Strange got off easy. Hours? Usually it's days or weeks.
* Pygmalian is a myth/trope where literally the Creator/Mentor molds an object (ivory statue? Scissors?) into a fully realized person, but figuratively molds a person (see the Pygmalion play, La Femme Nikita, etc.) -- driven by the mentor's force of will. This post is about the opposite, the student/protege's force of will.