In Markus Land's Introduction to Infinity-Categories, he defines sub-$\infty$-categories the following way (p. 56):
Definition. A sub-$\infty$-category $\mathscr{C}'$ of an $\infty$-category $\mathscr{C}$ is a sub-simplicial set determined by a subset $X \subseteq \mathscr{C}_0$ of $0$-simplices and a subset $S \subseteq \mathscr{C}_1$ of $1$-simplices between objects lying in $X$, such that $S$ contains identities and is closed under compositions and equivalences. Then an $n$-simplex of $\mathscr{C}$ belongs to $\mathscr{C}'$ if and only if the edges of its restriction to the spine $I^n$ are contained in $S$.
Question. Why do we want $S$ to be closed under equivalences?
In short, the definition you cite is an attempt to fix a flaw in the traditional definition of "subcategory". In some sense this has to do with how seriously you take the principle of invariance under isomorphism (or equivalence).
Consider the forgetful functor from the (1-)category of topological spaces to the category of sets. As typically defined, this is not injective on objects, but if you believe the universe axiom, or a sufficiently powerful form of the axiom of choice, it is possible to factorise it as an injective-on-objects faithful functor $\textbf{Top} \to \textbf{Set}$ followed by an autoequivalence $\textbf{Set} \to \textbf{Set}$. Thus, according to the traditional definition of subcategory, and perhaps contrary to intuition, $\textbf{Top}$ can be embedded as a subcategory of $\textbf{Set}$...!
Some people say that it is nonsensical to even ask about whether two objects in a category are equal. Thus, for them, the notion of a functor being injective on objects is also nonsensical. Naïvely replacing $=$ with $\cong$ would yield the notion of a functor that "reflects isomorphy", that is, $F X \cong F Y$ implies $X \cong Y$, but this notion does not seem useful in practice.
A slightly better notion is that of a conservative functor, i.e. a functor $F$ such that, given a morphism $f : X \to Y$, if $F f : F X \to F Y$ is an isomorphism then $f : X \to Y$ is an isomorphism. But this is still not quite right: for example, the forgetful functor $\textbf{Grp} \to \textbf{Set}$ is conservative, but we do not really want to think of $\textbf{Grp}$ as a subcategory of $\textbf{Set}$.
Another point against conservative functors (as a notion of subcategory) is that they do not "reflect isomorphy" and are not automatically faithful. (In practice, however, conservative functors are often faithful.) This leads to the notion of pseudomonic functor, i.e. a faithful functor that is fully faithful on isomorphisms. A functor $F : \mathcal{C} \to \mathcal{D}$ is pseudomonic if and only if $$\require{AMScd} \begin{CD} \mathcal{C} @>{\textrm{id}}>> \mathcal{C} \\ @V{\textrm{id}}VV @VV{F}V \\ \mathcal{C} @>>{F}> \mathcal{D} \end{CD}$$ is (up to equivalence) a pseudopullback square in the 2-category $\textbf{Cat}$, which is completely analogous to the characterisation of monomorphisms by pullback squares in 1-categories. It is this notion of subcategory that is captured when we insist that subcategories be closed under isomorphisms. If we take this characterisation and interpret it in the $(\infty, 1)$-category of quasicategories we get (up to equivalence) the notion of subcategory you ask about.