The answer is more straightforward than what I was saying in the comments above, though the general principle of what I was saying holds. Let $n$ denote the dimension of $M$.

Recall that the Stiefel-Whitney classes are characterized by a set of four axioms. The normalization axiom says that $w_1$ of the unorientable line bundle over $S^1$ is the generator of $H^1(S^1, mathbb{Z}/2)$ and that $w_1$ of the orientable line bundle is $0 in H^1(S^1, mathbb{Z}/2)$.

Fix now a loop $gamma colon S^1 to M$. The question of whether $TM$ is orientable over $S^1$ corresponds to whether the determinant bundle $Lambda^n TM$ is trivial or not when restricted to $gamma$. Naturality of the Stiefel-Whitney class gives

[

< w_1( gamma^* Lambda^n TM), [S^1] > = < gamma^* w_1(Lambda^n TM), [S^1]>

]

where this pairing is between cohomology/homology of $S^1$.

Now, the LHS is equal to $1$ iff $gamma^*(Lambda^n TM)$ is the non-trivial bundle, i.e. iff this loop is non-orientable. The RHS is equal to $ < w_1(Lambda^n TM), gamma_*[S^1]>$. This shows that $w_1$ exhibits the property you claim.

If you have a triangulated manifold then it is orientable when its n simplices can be given signs (+/-1) so that the signed sum is an integer cycle.

If the manifold is not orientable then any signed sum of the n simplices is not a cycle and it turns out that what goes wrong is that some of the n-1 simplices in the boundary get counted twice rather than cancelling each other out.

This boundary which is a sum of doubles of n-1 simplices can be divided by two to give a 2 torsion Z homology class. This n-1 dimensional cycle represents the obstruction to orienting the manifold. I would strongly suspect that the first Stiefel Whitney class of the tangent bundle is the Poincare dual to this homology class. Check it out.