Sheaf cohomology of ringed space Why sheaf cohomology on a ringed space $(X, \mathcal O_x)$ are defined as derived functors to $\Gamma: \mathfrak{Ab}(X) \to \mathfrak{Ab}$, not to $\Gamma: \mathfrak{Mod}(X) \to \mathfrak{Mod}(\mathcal O_X(X))$? What bad happens if one defines them the second way?

As it turns out, the two possible ways of defining sheaf cohomology for a ringed space coincide. See Proposition 2.6 in [Hartshorne, Ch. III]. Something similar is true for ringed toposes, though the proof is more complicated: see here.
