My question is simply, why do we need functions with compact support? Are they a ntaural consequence of including Urysohn's lemma or Tietze extension theorem-which implies the Urysohn's lemma-?
I just want to understand where do they come from so the theorems including them will be more familiar to me.
Expanding on the comment above: (smooth) partitions of unity play a crucial role in differential topology and differential geometry. They let us make global certain local constructions, and in particular they can be used to prove the Whitney Embedding Theorem, one of the more famous results of smooth topology.
Another important result that partitions of unity give us is the existence of Riemannian Metrics on smooth manifolds. Riemannian metrics are important because they let us generalize a lot of what we like about Euclidean Geometry to arbitrary manifolds $M$.