I was reading Rudin's "Real and Complex Analysis," p. 39, which states in part:
"Suppose $X$ is a locally compact Hausdorff space, $V$ is open in $X$, $K\subset V$, and $K$ is compact. Then there exists an $f \in C(X)$ such that $K\subset supp(f) \subset V$."
It goes on to say that "it is easy to find semi-continuous functions that do this," but finding a "qualifying" continuous function is non trivial. Then it introduces Urysohn's lemma as the solution.
Why is this (that is, semi-continuous functions make the problem easy, but continuous functions make it hard)?
If you just want an (upper) semicontinuous function $f$, you can simply define $f(x)=1$ for all $x\in K$ and $f(x)=0$ for all $x\in X\setminus K$. This is upper semicontinous because $K$ is closed. On the other hand, it will not be continuous unless $K$ is also open, which is usually not the case. So this very easy construction works if you just want a semicontinuous function, but getting a continuous function requires more work.