Why use infimum in definition of Quantile function?

Because $F$ is right-continuous and nondecreasing, the superlevel sets of $F$ are of the form $[a,\infty)$ where $a>-\infty$ or else the entire line. When the superlevel set is the whole line, there is no min (among the reals), while the inf is $-\infty$. For $a=+\infty$ the superlevel set is empty and so the inf is $+\infty$. These cases can potentially arise when $p=0$ or $p=1$ respectively; for $p \in (0,1)$ one can indeed replace the $\inf$ with $\min$.