Significance of tensors of the form $\mathbf A - \frac12 \mathbf g\operatorname{tr}\mathbf A$ In pseudo-Riemannian geometry and GR, constructions of the form $\mathbf A - \frac12 \mathbf g\operatorname{tr}\mathbf A$ seem common; for example


*

*$G_{ab} := R_{ab} - \frac12 g_{ab}R$, the Einstein tensor;

*$\hat T_{ab} := T_{ab} - \frac12g_{ab}T^c{}_c$, a modified stress–energy tensor appearing in an alternative form of the Einstein equations, $R_{ab} = -8\pi \hat T_{ab}$ (see (4.10) of Witten for example);

*Perhaps a non-example, but the stress–energy tensor of electromagnetism  $T_{ab} = F_{ac}F_b{}^c - \frac14 g_{ab} F_{cd}F^{cd}$ looks like a generalisation of this pattern—especially if one writes
$$
H_{ab} := F_{ac}F_b{}^c, \\
T_{ab} = H_{ab} - \frac14 g_{ab} H_c{}^c.
$$
What properties does $\mathbf A - \frac12 \mathbf g\operatorname{tr}\mathbf A$ have that makes it "special"?

Notice that if $\mathbf B := \mathbf A  - \frac12 \mathbf g \operatorname{tr}\mathbf A$ then, in four dimensions, $\operatorname{tr}\mathbf B = (1 - \frac12\cdot 4)\operatorname{tr}\mathbf A = -\operatorname{tr}\mathbf A$ is trace-reversed.
Why is this this such an important property that the Einstein tensor exhibits it?
 A: In arbitrary spacetime dimensions, the Einstein tensor is $$G_{\mu\nu}~:=~R_{\mu\nu}(\Gamma)-\frac{1}{2}g_{\mu\nu}g^{\rho\sigma}R_{\rho\sigma}(\Gamma).\tag{1}$$ 
Let us also define the Einstein tensor-density
$${\cal G}_{\mu\nu}~:=~\sqrt{|g|}G_{\mu\nu}. \tag{2}$$
It satisfies a functional Maxwell relation
$$ \frac{\delta {\cal G}_{\mu\nu}(x)}{\delta g^{\rho\sigma}(x^{\prime})}
~=~ \frac{\delta {\cal G}_{\rho\sigma}(x^{\prime})}{\delta g^{\mu\nu}(x)}. \tag{3}$$
Eq. (3) means that there exists a functional $S$ [which not surprisingly happens to be the Einstein-Hilbert (EH) action up to normalization] such that
$$ {\cal G}_{\mu\nu}(x)~=~\frac{\delta S}{\delta g^{\mu\nu}(x)}.\tag{4}$$
Other linear combinations of the terms in eq. (1) [apart from an over-all normalization] do not enjoy the property (3) [and its consequences].
A: Vary
$$S=\int \sqrt{\det g} g^{\alpha\beta} X_{\alpha\beta}$$
with respect to $g^{\alpha\beta}$ to get the index-down stress-energy tensor (assuming $X$ does not depend on $g$)
$$
\frac{\delta S}{\delta g^{\alpha\beta}}= \sqrt{\det g} \left(X_{\alpha\beta}-\frac{1}{2} g_{\alpha\beta} X_{\gamma\delta}g^{\gamma\delta}\right)$$
so stress energy tensors for non-gravitational theories will be of this form. (Well, $\delta S/\delta g^{\alpha\beta}g^{\beta\gamma}$ is of the form you describe.)
There is also a perverse explanation: 2 dimensions are special, and matrices $A-{\rm tr}(A)/2$ are traceless if they are two-by-two; relatedly, the combination $\sqrt{\det g}g^{\alpha\beta}$ is of unit determinant (I'm assuming Euclidean signature here so the determinant is positive and I don't have to write a minus sign) in two dimensions, which is responsible for e.g. the Weyl invariance of the bosonic string.
