When is the pushforward of a quasi-coherent sheaf quasi-coherent? Hartshorne proof
1) There is no reason to believe that $ f_* \mathcal{F}$ is coherent whenever $X$ is affine : Hartshorne certainly does not claim that, contrary to your typo [now corrected !].
2) The reason that some hypotheses must be made on $f$ is that the result may be false without them!
There exists an example due to Altman-Hoobler-Kleiman, page 36 where indeed for some morphism $f:X \rightarrow Y$ and some quasi-coherent sheaf $\mathcal F$ on $X$ the image sheaf $ f_* \mathcal{F}$ is not quasi-coherent.
Such examples are non trivial: for example Dieudonné-Grothendieck claim to give one (in the new edition of EGA, page 314) but their description is incorrect.
Edit: A simple counterexample
Here is an example of a non quasi-coherent image of a quasi-coherent sheaf, simpler than the one in Altman-Hoobler-Kleiman :
a) Let $X_i\; (i\in \mathbb N)$ and $S$ be copies of $\operatorname {Spec}(\mathbb Z)$ and let $X=\coprod X_i$ be the disjoint union of the $X_i$'s equipped with its natural morphism $f=\coprod_i id_i:X\to S$, the one restricting for every $i$ to the identity $id_i:X_i=\operatorname {Spec}(\mathbb Z)\to S=\operatorname {Spec}(\mathbb Z)$.
The counterexample will simply be $\mathcal F= \mathcal O_X$: I will now show that $f_* \mathcal O_X$ is a non quasi-coherent sheaf on $S$.
b) Since for a quasi coherent sheaf $\mathcal G$ on $S$ the canonical morphism $$m_U:\mathcal G(S) \otimes _{\mathcal O_S(S)}\mathcal O_X(U)\to \mathcal G(U)$$ must be bijective for all affine $U\subset S$, it suffices to show that this property is violated for $\mathcal G =f_*(\mathcal O_X) $ and $U= D(2)=\operatorname {Spec}(\mathbb Z)\setminus \{(2)\}\subset S=\operatorname {Spec}(\mathbb Z) $.
c) In our situation we get the canonical morphism $m_U:(\prod_{i\in \mathbb N} \mathbb Z) \otimes _{\mathbb Z} \mathbb Z[{\frac 12}]\to \prod_{i\in \mathbb N}\mathbb Z[{\frac 12}]$.
This morphism is not surjective because the image $m_U(t) $ of an element $t\in (\prod_{i\in \mathbb N} \mathbb Z) \otimes _{\mathbb Z} \mathbb Z[{\frac 12}]$ is a sequence of rational numbers $(\frac {a_i}{2^M})_i\in\prod_{i\in \mathbb N}\mathbb Z[{\frac 12}]$ with some fixed denominator $2^M$.
Whereas in $\prod_{i\in \mathbb N}\mathbb Z[{\frac 12}]$ there exists sequences $(\frac {b_i}{2^{s_i}})_i $ of rational numbers with $b_i$ odd and denominators $2^{s_i}$ tending to infinity.
Conclusion: $f_* \mathcal O_X$ is a non quasi-coherent sheaf on $S=\operatorname {Spec}(\mathbb Z)$ .
The answer by "user10000100_u", marked correct, is false. Pavel Coupek's remark is true. Perhaps to clarify where the confusion lies:
"-The category of quasi-coherent sheaves is not abelian in general, infinite direct products of quasi-coherent sheaves are not quasi-coherent in general."
The category of quasi-coherent sheaves has all limits, so these direct products exist and ARE quasi-coherent. However, one can also take the direct product as O_X-module sheaves, and this product yields a different object; in particular usually an O_X-module sheaf which is not quasi-coherent.
The category of quasi-coherent sheaves is not abelian in general, infinite direct products of quasi-coherent sheaves are not quasi-coherent in general. That's why the fact that the family of indexes is finite is crucial.
Remark for general schemes : see "Modules vs. quasi-coherent modules" of Thomason & Trobaugh in "Higher Algebraic K-theory of Schemes and Derived Categories, The Grothendieck Festschrift, Vol. III", Thomason wrote that it was as this time a priori unknown if the category of quasi-coherent sheaves over a general scheme has all limits. Since the existence of arbitrary products would imply the existence of limits...
What is the current situation on this ? Answer : as of last version of the Stacks Project, it is still unknown.