Why is a section of a sheaf over closed set defined this way?
Your point of view for the definition of $\Gamma (S, F)$ and thus implicitly for $F\mid S $ is indeed the correct one.
The formula $\Gamma (S, F)= \varinjlim_{S\subset U} F(U)$ should not be taken as the definition, even though it is is true in some cases, for exmple if $X$ is paracompact: cf. Corollaire 1 to Théorème 3.3.1, page 151 of Godement's Topologie Algébrique et Théorie des Faisceaux.